1 -- File: StepData_FreeFormEntity.cdl
2 -- Created: Fri Jan 3 10:51:01 1997
3 -- Author: Christian CAILLET
4 -- <cky@heliox.paris1.matra-dtv.fr>
5 ---Copyright: Matra Datavision 1997
8 class FreeFormEntity from StepData inherits TShared
10 ---Purpose : A Free Form Entity allows to record any kind of STEP
11 -- parameters, in any way of typing
12 -- It is implemented with an array of fields
13 -- A Complex entity can be defined, as a chain of FreeFormEntity
16 uses CString, AsciiString from TCollection,
17 HSequenceOfAsciiString from TColStd,
18 Field from StepData, HArray1OfField from StepData
22 Create returns mutable FreeFormEntity;
23 ---Purpose : Creates a FreeFormEntity, with no field, no type
25 SetStepType (me : mutable; typenam : CString);
26 ---Purpose : Sets the type of an entity
27 -- For a complex one, the type of this member
29 StepType (me) returns CString;
30 ---Purpose : Returns the recorded StepType
31 -- For a complex one, the type of this member
33 SetNext (me : mutable; next : FreeFormEntity; last : Boolean = Standard_True);
34 ---Purpose : Sets a next member, in order to define or complete a Complex
36 -- If <last> is True (D), this next will be set as last of list
37 -- Else, it is inserted just as next of <me>
38 -- If <next> is Null, Next is cleared
40 Next (me) returns FreeFormEntity;
41 ---Purpose : Returns the next member of a Complex entity
42 -- (remark : the last member has none)
44 IsComplex (me) returns Boolean;
45 ---Purpose : Returns True if a FreeFormEntity is Complex (i.e. has Next)
47 Typed (me; typenam : CString) returns FreeFormEntity;
48 ---Purpose : Returns the member of a FreeFormEntity of which the type name
49 -- is given (exact match, no sub-type)
51 TypeList (me) returns HSequenceOfAsciiString;
52 ---Purpose : Returns the list of types (one type for a simple entity),
53 -- as is (non reordered)
55 Reorder (myclass; ent : in out mutable FreeFormEntity) returns Boolean;
56 ---Purpose : Reorders a Complex entity if required, i.e. if member types
57 -- are not in alphabetic order
58 -- Returns False if nothing done (order was OK or simple entity),
59 -- True plus modified <ent> if <ent> has been reordered
62 SetNbFields (me : mutable; nb : Integer);
63 ---Purpose : Sets a count of Fields, from scratch
65 NbFields (me) returns Integer;
66 ---Purpose : Returns the count of fields
68 Field (me; num : Integer) returns Field;
69 ---Purpose : Returns a field from its rank, for read-only use
70 ---C++ : return const &
72 CField (me : mutable; num : Integer) returns Field;
73 ---Purpose : Returns a field from its rank, in order to modify it
78 thetype : AsciiString from TCollection;
79 thefields : HArray1OfField;
80 thenext : FreeFormEntity;