b311480e |
1 | -- Created on: 1997-05-09 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1997-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class ESDescr from StepData inherits EDescr |
18 | |
19 | ---Purpose : This class is intended to describe the authorized form for a |
20 | -- Simple (not Plex) Entity, as a list of fields |
21 | |
22 | uses CString, AsciiString from TCollection, |
23 | HArray1OfTransient from TColStd, DictionaryOfInteger from Dico, |
24 | PDescr from StepData, Described from StepData |
25 | |
26 | is |
27 | |
6e33d3ce |
28 | Create (name : CString) returns ESDescr; |
7fd59977 |
29 | ---Purpose : Creates an ESDescr with a type name |
30 | |
31 | SetNbFields (me : mutable; nb : Integer); |
32 | ---Purpose : Sets a new count of fields |
33 | -- Each one is described by a PDescr |
34 | |
35 | SetField (me : mutable; num : Integer; name : CString; descr : PDescr); |
36 | ---Purpose : Sets a PDescr to describe a field |
37 | -- A Field is designated by its rank and name |
38 | |
39 | SetBase (me : mutable; base : ESDescr); |
40 | ---Purpose : Sets an ESDescr as based on another one |
41 | -- Hence, if there are inherited fields, the derived ESDescr |
42 | -- cumulates all them, while the base just records its own ones |
43 | |
44 | SetSuper (me : mutable; super : ESDescr); |
45 | ---Purpose : Sets an ESDescr as "super-type". Applies an a base (non |
46 | -- derived) ESDescr |
47 | |
48 | TypeName (me) returns CString; |
49 | ---Purpose : Returns the type name given at creation time |
50 | |
51 | StepType (me) returns AsciiString from TCollection; |
52 | ---Purpose : Returns the type name as an AsciiString |
53 | ---C++ : return const & |
54 | |
55 | Base (me) returns ESDescr; |
56 | ---Purpose : Returns the basic ESDescr, null if <me> is not derived |
57 | |
58 | Super (me) returns ESDescr; |
59 | ---Purpose : Returns the super-type ESDescr, null if <me> is root |
60 | |
61 | IsSub (me; other : ESDescr) returns Boolean; |
62 | ---Purpose : Tells if <me> is sub-type of (or equal to) another one |
63 | |
64 | NbFields (me) returns Integer; |
65 | ---Purpose : Returns the count of fields |
66 | |
67 | Rank (me; name : CString) returns Integer; |
68 | ---Purpose : Returns the rank of a field from its name. 0 if unknown |
69 | |
70 | Name (me; num : Integer) returns CString; |
71 | ---Purpose : Returns the name of a field from its rank. empty if outofrange |
72 | |
73 | Field (me; num : Integer) returns PDescr; |
74 | ---Purpose : Returns the PDescr for the field <num> (or Null) |
75 | |
76 | NamedField (me; name : CString) returns PDescr; |
77 | ---Purpose : Returns the PDescr for the field named <name> (or Null) |
78 | |
79 | -- inherited |
80 | |
81 | Matches (me; steptype : CString) returns Boolean; |
82 | ---Purpose : Tells if a ESDescr matches a step type : exact or super type |
83 | |
84 | IsComplex (me) returns Boolean; |
85 | ---Purpose : Returns False |
86 | |
6e33d3ce |
87 | NewEntity (me) returns Described; |
7fd59977 |
88 | ---Purpose : Creates a described entity (i.e. a simple one) |
89 | |
90 | fields |
91 | |
92 | thenom : AsciiString; |
93 | thedescr : HArray1OfTransient; |
94 | thenames : DictionaryOfInteger; |
95 | thebase : ESDescr; |
96 | thesuper : ESDescr; |
97 | |
98 | end ESDescr; |