1 -- Created on: 1993-07-23
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 class FileProtocol from StepData inherits Protocol from StepData
25 ---Purpose : A FileProtocol is defined as the addition of several already
26 -- existing Protocols. It corresponds to the definition of a
27 -- SchemaName with several Names, each one being attached to a
28 -- specific Protocol. Thus, a File defined with a compound Schema
29 -- is processed as any other one, once built the equivalent
30 -- compound Protocol, a FileProtocol
32 uses Type, CString, SequenceOfTransient,
33 Graph from Interface, Check from Interface,
34 Protocol from Interface, Protocol from StepData
38 Create returns mutable FileProtocol;
39 ---Purpose : Creates an empty FileProtocol
41 Add (me : mutable; protocol : Protocol from StepData);
42 ---Purpose : Adds a Protocol to the definition list of the FileProtocol
43 -- But ensures that each class of Protocol is present only once
46 NbResources (me) returns Integer is redefined;
47 ---Purpose : Gives the count of Protocols used as Resource (can be zero)
48 -- i.e. the count of Protocol recorded by calling the method Add
50 Resource (me; num : Integer) returns Protocol from Interface is redefined;
51 ---Purpose : Returns a Resource, given a rank. Here, rank of calling Add
53 TypeNumber (me; atype : any Type) returns Integer is redefined;
54 ---Purpose : Returns a Case Number, specific of each recognized Type
55 -- Here, NO Type at all is recognized properly : all Types are
56 -- recognized by the resources
58 GlobalCheck (me; G : Graph; ach : in out Check)
59 returns Boolean is redefined;
60 ---Purpose : Calls GlobalCheck for each of its recorded ressources
62 -- -- Specific for StepData -- --
64 SchemaName (me) returns CString is redefined;
65 ---Purpose : Returns the Schema Name attached to each class of Protocol
66 -- To be redefined by each sub-class
67 -- Here, SchemaName returns "" (empty String)
68 -- was C++ : return const
72 thecomps : SequenceOfTransient;