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_Described_HeaderFile
18 #define _StepData_Described_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Transient.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <Standard_CString.hxx>
26 class StepData_EDescr;
27 class Interface_InterfaceMismatch;
28 class StepData_Simple;
30 class Interface_Check;
31 class Interface_EntityIterator;
34 class StepData_Described;
35 DEFINE_STANDARD_HANDLE(StepData_Described, Standard_Transient)
37 //! General frame to describe entities with Description (Simple or
39 class StepData_Described : public Standard_Transient
45 //! Returns the Description used to define this entity
46 Standard_EXPORT Handle(StepData_EDescr) Description() const;
48 //! Tells if a described entity is complex
49 Standard_EXPORT virtual Standard_Boolean IsComplex() const = 0;
51 //! Tells if a step type is matched by <me>
52 //! For a Simple Entity : own type or super type
53 //! For a Complex Entity : one of the members
54 Standard_EXPORT virtual Standard_Boolean Matches (const Standard_CString steptype) const = 0;
56 //! Returns a Simple Entity which matches with a Type in <me> :
57 //! For a Simple Entity : me if it matches, else a null handle
58 //! For a Complex Entity : the member which matches, else null
59 Standard_EXPORT virtual Handle(StepData_Simple) As (const Standard_CString steptype) const = 0;
61 //! Tells if a Field brings a given name
62 Standard_EXPORT virtual Standard_Boolean HasField (const Standard_CString name) const = 0;
64 //! Returns a Field from its name; read-only
65 Standard_EXPORT virtual const StepData_Field& Field (const Standard_CString name) const = 0;
67 //! Returns a Field from its name; read or write
68 Standard_EXPORT virtual StepData_Field& CField (const Standard_CString name) = 0;
70 //! Fills a Check by using its Description
71 Standard_EXPORT virtual void Check (Handle(Interface_Check)& ach) const = 0;
73 //! Fills an EntityIterator with entities shared by <me>
74 Standard_EXPORT virtual void Shared (Interface_EntityIterator& list) const = 0;
79 DEFINE_STANDARD_RTTIEXT(StepData_Described,Standard_Transient)
84 //! Initializes a Described Entity from a Description
85 //! (i.e. puts it in a field ...)
86 Standard_EXPORT StepData_Described(const Handle(StepData_EDescr)& descr);
93 Handle(StepData_EDescr) thedescr;
104 #endif // _StepData_Described_HeaderFile