0024947: Redesign OCCT legacy type system -- automatic
[occt.git] / src / StepData / StepData_HeaderTool.cdl
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
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License 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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class HeaderTool  from StepData
18
19     ---Purpose : HeaderTool exploits data from Header to build a Protocol :
20     --           it uses the Header Entity FileSchema to do this.
21     --           It builds a Protocol from the Global List of Protocols
22     --           stored in the Library ReaderLib
23
24 uses OStream, AsciiString from TCollection, SequenceOfAsciiString from TColStd,
25      StepReaderData, Protocol from StepData, FileProtocol
26
27 is
28
29     Create (data : StepReaderData) returns HeaderTool;
30     ---Purpose : Creates a HeaderTool from data read from a File. Computes the
31     --           list of Schema Names. The Protocol will be computed later
32     --           (because there are several options)
33
34     Create (names : SequenceOfAsciiString from TColStd) returns HeaderTool;
35     ---Purpose : Creates a HeaderTool directly from a list of Schema Names
36
37     NbSchemaNames (me) returns Integer;
38     ---Purpose : Returns the count of SchemaNames
39
40     SchemaName (me; num : Integer) returns AsciiString from TCollection;
41     ---Purpose : Returns a SchemaName, given its rank
42     ---C++ : return const &
43
44     NamedProtocol (me; name : AsciiString from TCollection)
45         returns Protocol from StepData;
46     ---Purpose : Returns the Protocol which corresponds to a Schema Name
47     --           Returns a Null Handle if this Schema Name is attached to no
48     --           Protocol recorded in the Global List of ReaderLib
49
50         --  Building a Protocol  --
51
52     Build (me : in out; protocol : FileProtocol);
53     ---Purpose : Fills a FileProtocol with the list of Protocols attached to
54     --           the list of Schema Names. It can remain empty ...
55
56     Protocol (me : in out) returns Protocol from StepData;
57     ---Purpose : Returns a Protocol computed from the list of Schema Names :
58     --           - a Null Handle if no SchemaName has been recognized (or list
59     --             empty)
60     --           - a single Protocol if only one SchemaName has been recognized
61     --           - a FileProtocol with its componants if several SchemaNames
62     --             have been recognized
63     ---See also : method Ignored, to see if some SchemaNames were not
64     --            recognized, then they remain Ignored
65
66     IsDone (me) returns Boolean;
67     ---Purpose : Returns True if either Build or Protocol has been called
68     --           If it is False, Ignored and NbIgnored should not be called
69
70     NbIgnoreds (me) returns Integer;
71     ---Purpose : Returns the count of ignored SchemaNames (0 if all were OK)
72
73     Ignored (me; num : Integer) returns AsciiString from TCollection;
74     ---Purpose : Returns an ignored SchemaName, given its rank in the list of
75     --           Ignored SchemaNames (not in the total list)
76     ---C++ : return const &
77
78     Print (me; S : in out OStream);
79     ---Purpose : Sends the state of the HeaderTool in a comprehensive way,
80     --           to an output stream
81
82 fields
83
84     thenames   : SequenceOfAsciiString from TColStd;
85     thedone    : Boolean;
86     theignored : SequenceOfAsciiString from TColStd;
87
88 end HeaderTool;