1 -- Created on: 1993-07-23
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1993-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class FileProtocol from StepData inherits Protocol from StepData
19 ---Purpose : A FileProtocol is defined as the addition of several already
20 -- existing Protocols. It corresponds to the definition of a
21 -- SchemaName with several Names, each one being attached to a
22 -- specific Protocol. Thus, a File defined with a compound Schema
23 -- is processed as any other one, once built the equivalent
24 -- compound Protocol, a FileProtocol
26 uses Type, CString, SequenceOfTransient,
27 Graph from Interface, Check from Interface,
28 Protocol from Interface, Protocol from StepData
32 Create returns mutable FileProtocol;
33 ---Purpose : Creates an empty FileProtocol
35 Add (me : mutable; protocol : Protocol from StepData);
36 ---Purpose : Adds a Protocol to the definition list of the FileProtocol
37 -- But ensures that each class of Protocol is present only once
40 NbResources (me) returns Integer is redefined;
41 ---Purpose : Gives the count of Protocols used as Resource (can be zero)
42 -- i.e. the count of Protocol recorded by calling the method Add
44 Resource (me; num : Integer) returns Protocol from Interface is redefined;
45 ---Purpose : Returns a Resource, given a rank. Here, rank of calling Add
47 TypeNumber (me; atype : any Type) returns Integer is redefined;
48 ---Purpose : Returns a Case Number, specific of each recognized Type
49 -- Here, NO Type at all is recognized properly : all Types are
50 -- recognized by the resources
52 GlobalCheck (me; G : Graph; ach : in out Check)
53 returns Boolean is redefined;
54 ---Purpose : Calls GlobalCheck for each of its recorded ressources
56 -- -- Specific for StepData -- --
58 SchemaName (me) returns CString is redefined;
59 ---Purpose : Returns the Schema Name attached to each class of Protocol
60 -- To be redefined by each sub-class
61 -- Here, SchemaName returns "" (empty String)
62 -- was C++ : return const
66 thecomps : SequenceOfTransient;