1 // Created on: 1992-02-11
2 // Created by: Christian CAILLET
3 // Copyright (c) 1992-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 #ifndef _StepData_UndefinedEntity_HeaderFile
18 #define _StepData_UndefinedEntity_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Boolean.hxx>
24 #include <Standard_Transient.hxx>
25 #include <Standard_CString.hxx>
26 #include <Standard_Integer.hxx>
27 class TCollection_HAsciiString;
28 class Interface_UndefinedContent;
29 class StepData_StepReaderData;
30 class Interface_Check;
31 class StepData_StepWriter;
32 class Interface_CopyTool;
33 class Interface_EntityIterator;
36 class StepData_UndefinedEntity;
37 DEFINE_STANDARD_HANDLE(StepData_UndefinedEntity, Standard_Transient)
39 //! Undefined entity specific to Step Interface, in which StepType
40 //! is defined at each instance, or is a SubList of another one
41 //! Uses an UndefinedContent, that from Interface is suitable.
42 //! Also an Entity defined by STEP can be "Complex Type" (see
43 //! ANDOR clause in Express).
44 class StepData_UndefinedEntity : public Standard_Transient
50 //! creates an Unknown entity
51 Standard_EXPORT StepData_UndefinedEntity();
53 //! Creates a SubList of an Unknown entity : it is an Unknown
54 //! Entity with no Type, but flagged as "SUB" if issub is True
55 Standard_EXPORT StepData_UndefinedEntity(const Standard_Boolean issub);
57 //! Returns the UndefinedContent which brings the Parameters
58 Standard_EXPORT Handle(Interface_UndefinedContent) UndefinedContent() const;
60 //! Returns True if an Unndefined Entity is SubPart of another one
61 Standard_EXPORT Standard_Boolean IsSub() const;
63 //! Returns the "super-entity" of a sub-part
64 Standard_EXPORT Handle(StepData_UndefinedEntity) Super() const;
66 //! Returns True if <me> defines a Multiple Type Entity (see ANDOR)
67 Standard_EXPORT Standard_Boolean IsComplex() const;
69 //! For a Multiple Type Entity, returns the Next "Componant"
70 //! For more than two Types, iterative definition (Next->Next...)
71 //! Returns a Null Handle for the end of the List
72 Standard_EXPORT Handle(StepData_UndefinedEntity) Next() const;
74 //! gives entity type, read from file
75 //! For a Complex Type Entity, gives the first Type read, each
76 //! "Next" gives its "partial" type
77 //! was C++ : return const
78 Standard_EXPORT Standard_CString StepType() const;
80 //! reads data from StepReaderData (i.e. from file), by filling
81 //! StepType and parameters stored in the UndefinedContent
82 Standard_EXPORT void ReadRecord (const Handle(StepData_StepReaderData)& SR, const Standard_Integer num, Handle(Interface_Check)& ach);
84 //! write data to StepWriter, taken from UndefinedContent
85 Standard_EXPORT void WriteParams (StepData_StepWriter& SW) const;
87 //! reads another UndefinedEntity from StepData
88 Standard_EXPORT void GetFromAnother (const Handle(StepData_UndefinedEntity)& other, Interface_CopyTool& TC);
90 //! Fills the list of shared entities
91 Standard_EXPORT void FillShared (Interface_EntityIterator& list) const;
96 DEFINE_STANDARD_RTTIEXT(StepData_UndefinedEntity,Standard_Transient)
106 Handle(TCollection_HAsciiString) thetype;
107 Handle(Interface_UndefinedContent) thecont;
108 Standard_Boolean thesub;
109 Handle(StepData_UndefinedEntity) thenext;
120 #endif // _StepData_UndefinedEntity_HeaderFile