1 -- Created on: 1997-05-09
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1997-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 ESDescr from StepData inherits EDescr
25 ---Purpose : This class is intended to describe the authorized form for a
26 -- Simple (not Plex) Entity, as a list of fields
28 uses CString, AsciiString from TCollection,
29 HArray1OfTransient from TColStd, DictionaryOfInteger from Dico,
30 PDescr from StepData, Described from StepData
34 Create (name : CString) returns mutable ESDescr;
35 ---Purpose : Creates an ESDescr with a type name
37 SetNbFields (me : mutable; nb : Integer);
38 ---Purpose : Sets a new count of fields
39 -- Each one is described by a PDescr
41 SetField (me : mutable; num : Integer; name : CString; descr : PDescr);
42 ---Purpose : Sets a PDescr to describe a field
43 -- A Field is designated by its rank and name
45 SetBase (me : mutable; base : ESDescr);
46 ---Purpose : Sets an ESDescr as based on another one
47 -- Hence, if there are inherited fields, the derived ESDescr
48 -- cumulates all them, while the base just records its own ones
50 SetSuper (me : mutable; super : ESDescr);
51 ---Purpose : Sets an ESDescr as "super-type". Applies an a base (non
54 TypeName (me) returns CString;
55 ---Purpose : Returns the type name given at creation time
57 StepType (me) returns AsciiString from TCollection;
58 ---Purpose : Returns the type name as an AsciiString
59 ---C++ : return const &
61 Base (me) returns ESDescr;
62 ---Purpose : Returns the basic ESDescr, null if <me> is not derived
64 Super (me) returns ESDescr;
65 ---Purpose : Returns the super-type ESDescr, null if <me> is root
67 IsSub (me; other : ESDescr) returns Boolean;
68 ---Purpose : Tells if <me> is sub-type of (or equal to) another one
70 NbFields (me) returns Integer;
71 ---Purpose : Returns the count of fields
73 Rank (me; name : CString) returns Integer;
74 ---Purpose : Returns the rank of a field from its name. 0 if unknown
76 Name (me; num : Integer) returns CString;
77 ---Purpose : Returns the name of a field from its rank. empty if outofrange
79 Field (me; num : Integer) returns PDescr;
80 ---Purpose : Returns the PDescr for the field <num> (or Null)
82 NamedField (me; name : CString) returns PDescr;
83 ---Purpose : Returns the PDescr for the field named <name> (or Null)
87 Matches (me; steptype : CString) returns Boolean;
88 ---Purpose : Tells if a ESDescr matches a step type : exact or super type
90 IsComplex (me) returns Boolean;
91 ---Purpose : Returns False
93 NewEntity (me) returns mutable Described;
94 ---Purpose : Creates a described entity (i.e. a simple one)
99 thedescr : HArray1OfTransient;
100 thenames : DictionaryOfInteger;