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_Plex_HeaderFile
18 #define _StepData_Plex_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TColStd_SequenceOfTransient.hxx>
24 #include <StepData_Described.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_CString.hxx>
27 #include <Standard_Integer.hxx>
28 #include <TColStd_HSequenceOfAsciiString.hxx>
29 class Interface_InterfaceMismatch;
30 class StepData_ECDescr;
31 class StepData_Simple;
33 class Interface_Check;
34 class Interface_EntityIterator;
38 DEFINE_STANDARD_HANDLE(StepData_Plex, StepData_Described)
40 //! A Plex (for Complex) Entity is defined as a list of Simple
41 //! Members ("external mapping")
42 //! The types of these members must be in alphabetic order
43 class StepData_Plex : public StepData_Described
49 //! Creates a Plex (empty). The complete creation is made by the
50 //! ECDescr itself, by calling Add
51 Standard_EXPORT StepData_Plex(const Handle(StepData_ECDescr)& descr);
53 //! Adds a member to <me>
54 Standard_EXPORT void Add (const Handle(StepData_Simple)& member);
56 //! Returns the Description as for a Plex
57 Standard_EXPORT Handle(StepData_ECDescr) ECDescr() const;
60 Standard_EXPORT Standard_Boolean IsComplex() const Standard_OVERRIDE;
62 //! Tells if a step type is matched by <me>
63 //! For a Simple Entity : own type or super type
64 //! For a Complex Entity : one of the members
65 Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const Standard_OVERRIDE;
67 //! Returns a Simple Entity which matches with a Type in <me> :
68 //! For a Simple Entity : me if it matches, else a null handle
69 //! For a Complex Entity : the member which matches, else null
70 Standard_EXPORT Handle(StepData_Simple) As (const Standard_CString steptype) const Standard_OVERRIDE;
72 //! Tells if a Field brings a given name
73 Standard_EXPORT Standard_Boolean HasField (const Standard_CString name) const Standard_OVERRIDE;
75 //! Returns a Field from its name; read-only
76 Standard_EXPORT const StepData_Field& Field (const Standard_CString name) const Standard_OVERRIDE;
78 //! Returns a Field from its name; read or write
79 Standard_EXPORT StepData_Field& CField (const Standard_CString name) Standard_OVERRIDE;
81 //! Returns the count of simple members
82 Standard_EXPORT Standard_Integer NbMembers() const;
84 //! Returns a simple member from its rank
85 Standard_EXPORT Handle(StepData_Simple) Member (const Standard_Integer num) const;
87 //! Returns the actual list of members types
88 Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) TypeList() const;
90 //! Fills a Check by using its Description
91 Standard_EXPORT void Check (Handle(Interface_Check)& ach) const Standard_OVERRIDE;
93 //! Fills an EntityIterator with entities shared by <me>
94 Standard_EXPORT void Shared (Interface_EntityIterator& list) const Standard_OVERRIDE;
99 DEFINE_STANDARD_RTTIEXT(StepData_Plex,StepData_Described)
109 TColStd_SequenceOfTransient themembers;
120 #endif // _StepData_Plex_HeaderFile