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 #ifndef _StepData_Simple_HeaderFile
18 #define _StepData_Simple_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <StepData_FieldListN.hxx>
24 #include <StepData_Described.hxx>
25 #include <Standard_CString.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <Standard_Integer.hxx>
28 class Interface_InterfaceMismatch;
29 class StepData_ESDescr;
31 class StepData_FieldListN;
32 class Interface_Check;
33 class Interface_EntityIterator;
36 class StepData_Simple;
37 DEFINE_STANDARD_HANDLE(StepData_Simple, StepData_Described)
39 //! A Simple Entity is defined by a type (which can heve super
40 //! types) and a list of parameters
41 class StepData_Simple : public StepData_Described
47 //! Creates a Simple Entity
48 Standard_EXPORT StepData_Simple(const Handle(StepData_ESDescr)& descr);
50 //! Returns description, as for simple
51 Standard_EXPORT Handle(StepData_ESDescr) ESDescr() const;
53 //! Returns the recorded StepType (TypeName of its ESDescr)
54 Standard_EXPORT Standard_CString StepType() const;
57 Standard_EXPORT Standard_Boolean IsComplex() const Standard_OVERRIDE;
59 //! Tells if a step type is matched by <me>
60 //! For a Simple Entity : own type or super type
61 //! For a Complex Entity : one of the members
62 Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const Standard_OVERRIDE;
64 //! Returns a Simple Entity which matches with a Type in <me> :
65 //! For a Simple Entity : me if it matches, else a null handle
66 //! For a Complex Entity : the member which matches, else null
67 Standard_EXPORT Handle(StepData_Simple) As (const Standard_CString steptype) const Standard_OVERRIDE;
69 //! Tells if a Field brings a given name
70 Standard_EXPORT Standard_Boolean HasField (const Standard_CString name) const Standard_OVERRIDE;
72 //! Returns a Field from its name; read-only
73 Standard_EXPORT const StepData_Field& Field (const Standard_CString name) const Standard_OVERRIDE;
75 //! Returns a Field from its name; read or write
76 Standard_EXPORT StepData_Field& CField (const Standard_CString name) Standard_OVERRIDE;
78 //! Returns the count of fields
79 Standard_EXPORT Standard_Integer NbFields() const;
81 //! Returns a field from its rank, for read-only use
82 Standard_EXPORT const StepData_Field& FieldNum (const Standard_Integer num) const;
84 //! Returns a field from its rank, in order to modify it
85 Standard_EXPORT StepData_Field& CFieldNum (const Standard_Integer num);
87 //! Returns the entire field list, read-only
88 Standard_EXPORT const StepData_FieldListN& Fields() const;
90 //! Returns the entire field list, read or write
91 Standard_EXPORT StepData_FieldListN& CFields();
93 //! Fills a Check by using its Description
94 Standard_EXPORT void Check (Handle(Interface_Check)& ach) const Standard_OVERRIDE;
96 //! Fills an EntityIterator with entities shared by <me>
97 Standard_EXPORT void Shared (Interface_EntityIterator& list) const Standard_OVERRIDE;
102 DEFINE_STANDARD_RTTIEXT(StepData_Simple,StepData_Described)
112 StepData_FieldListN thefields;
123 #endif // _StepData_Simple_HeaderFile