blob: 32c74868cf4109da929999c4b5f6da05ba99b38f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
-- File: StepData_ESDescr.cdl
-- Created: Fri May 9 15:34:51 1997
-- Author: Christian CAILLET
-- <cky@heliox.paris1.matra-dtv.fr>
---Copyright: Matra Datavision 1997
class ESDescr from StepData inherits EDescr
---Purpose : This class is intended to describe the authorized form for a
-- Simple (not Plex) Entity, as a list of fields
uses CString, AsciiString from TCollection,
HArray1OfTransient from TColStd, DictionaryOfInteger from Dico,
PDescr from StepData, Described from StepData
is
Create (name : CString) returns mutable ESDescr;
---Purpose : Creates an ESDescr with a type name
SetNbFields (me : mutable; nb : Integer);
---Purpose : Sets a new count of fields
-- Each one is described by a PDescr
SetField (me : mutable; num : Integer; name : CString; descr : PDescr);
---Purpose : Sets a PDescr to describe a field
-- A Field is designated by its rank and name
SetBase (me : mutable; base : ESDescr);
---Purpose : Sets an ESDescr as based on another one
-- Hence, if there are inherited fields, the derived ESDescr
-- cumulates all them, while the base just records its own ones
SetSuper (me : mutable; super : ESDescr);
---Purpose : Sets an ESDescr as "super-type". Applies an a base (non
-- derived) ESDescr
TypeName (me) returns CString;
---Purpose : Returns the type name given at creation time
StepType (me) returns AsciiString from TCollection;
---Purpose : Returns the type name as an AsciiString
---C++ : return const &
Base (me) returns ESDescr;
---Purpose : Returns the basic ESDescr, null if <me> is not derived
Super (me) returns ESDescr;
---Purpose : Returns the super-type ESDescr, null if <me> is root
IsSub (me; other : ESDescr) returns Boolean;
---Purpose : Tells if <me> is sub-type of (or equal to) another one
NbFields (me) returns Integer;
---Purpose : Returns the count of fields
Rank (me; name : CString) returns Integer;
---Purpose : Returns the rank of a field from its name. 0 if unknown
Name (me; num : Integer) returns CString;
---Purpose : Returns the name of a field from its rank. empty if outofrange
Field (me; num : Integer) returns PDescr;
---Purpose : Returns the PDescr for the field <num> (or Null)
NamedField (me; name : CString) returns PDescr;
---Purpose : Returns the PDescr for the field named <name> (or Null)
-- inherited
Matches (me; steptype : CString) returns Boolean;
---Purpose : Tells if a ESDescr matches a step type : exact or super type
IsComplex (me) returns Boolean;
---Purpose : Returns False
NewEntity (me) returns mutable Described;
---Purpose : Creates a described entity (i.e. a simple one)
fields
thenom : AsciiString;
thedescr : HArray1OfTransient;
thenames : DictionaryOfInteger;
thebase : ESDescr;
thesuper : ESDescr;
end ESDescr;
|