1 -- Created on: 1997-05-09
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1997-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 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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class ESDescr from StepData inherits EDescr
19 ---Purpose : This class is intended to describe the authorized form for a
20 -- Simple (not Plex) Entity, as a list of fields
22 uses CString, AsciiString from TCollection,
23 HArray1OfTransient from TColStd, DictionaryOfInteger from Dico,
24 PDescr from StepData, Described from StepData
28 Create (name : CString) returns ESDescr;
29 ---Purpose : Creates an ESDescr with a type name
31 SetNbFields (me : mutable; nb : Integer);
32 ---Purpose : Sets a new count of fields
33 -- Each one is described by a PDescr
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
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
44 SetSuper (me : mutable; super : ESDescr);
45 ---Purpose : Sets an ESDescr as "super-type". Applies an a base (non
48 TypeName (me) returns CString;
49 ---Purpose : Returns the type name given at creation time
51 StepType (me) returns AsciiString from TCollection;
52 ---Purpose : Returns the type name as an AsciiString
53 ---C++ : return const &
55 Base (me) returns ESDescr;
56 ---Purpose : Returns the basic ESDescr, null if <me> is not derived
58 Super (me) returns ESDescr;
59 ---Purpose : Returns the super-type ESDescr, null if <me> is root
61 IsSub (me; other : ESDescr) returns Boolean;
62 ---Purpose : Tells if <me> is sub-type of (or equal to) another one
64 NbFields (me) returns Integer;
65 ---Purpose : Returns the count of fields
67 Rank (me; name : CString) returns Integer;
68 ---Purpose : Returns the rank of a field from its name. 0 if unknown
70 Name (me; num : Integer) returns CString;
71 ---Purpose : Returns the name of a field from its rank. empty if outofrange
73 Field (me; num : Integer) returns PDescr;
74 ---Purpose : Returns the PDescr for the field <num> (or Null)
76 NamedField (me; name : CString) returns PDescr;
77 ---Purpose : Returns the PDescr for the field named <name> (or Null)
81 Matches (me; steptype : CString) returns Boolean;
82 ---Purpose : Tells if a ESDescr matches a step type : exact or super type
84 IsComplex (me) returns Boolean;
85 ---Purpose : Returns False
87 NewEntity (me) returns Described;
88 ---Purpose : Creates a described entity (i.e. a simple one)
93 thedescr : HArray1OfTransient;
94 thenames : DictionaryOfInteger;