42cf5bc1 |
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 |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _StepData_Plex_HeaderFile |
18 | #define _StepData_Plex_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
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; |
32 | class StepData_Field; |
33 | class Interface_Check; |
34 | class Interface_EntityIterator; |
35 | |
36 | |
37 | class StepData_Plex; |
38 | DEFINE_STANDARD_HANDLE(StepData_Plex, StepData_Described) |
39 | |
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 |
44 | { |
45 | |
46 | public: |
47 | |
48 | |
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); |
52 | |
53 | //! Adds a member to <me> |
54 | Standard_EXPORT void Add (const Handle(StepData_Simple)& member); |
55 | |
56 | //! Returns the Description as for a Plex |
57 | Standard_EXPORT Handle(StepData_ECDescr) ECDescr() const; |
58 | |
59 | //! Returns False |
79104795 |
60 | Standard_EXPORT Standard_Boolean IsComplex() const Standard_OVERRIDE; |
42cf5bc1 |
61 | |
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 |
79104795 |
65 | Standard_EXPORT Standard_Boolean Matches (const Standard_CString steptype) const Standard_OVERRIDE; |
42cf5bc1 |
66 | |
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 |
79104795 |
70 | Standard_EXPORT Handle(StepData_Simple) As (const Standard_CString steptype) const Standard_OVERRIDE; |
42cf5bc1 |
71 | |
72 | //! Tells if a Field brings a given name |
79104795 |
73 | Standard_EXPORT Standard_Boolean HasField (const Standard_CString name) const Standard_OVERRIDE; |
42cf5bc1 |
74 | |
75 | //! Returns a Field from its name; read-only |
79104795 |
76 | Standard_EXPORT const StepData_Field& Field (const Standard_CString name) const Standard_OVERRIDE; |
42cf5bc1 |
77 | |
78 | //! Returns a Field from its name; read or write |
79104795 |
79 | Standard_EXPORT StepData_Field& CField (const Standard_CString name) Standard_OVERRIDE; |
42cf5bc1 |
80 | |
81 | //! Returns the count of simple members |
82 | Standard_EXPORT Standard_Integer NbMembers() const; |
83 | |
84 | //! Returns a simple member from its rank |
85 | Standard_EXPORT Handle(StepData_Simple) Member (const Standard_Integer num) const; |
86 | |
87 | //! Returns the actual list of members types |
88 | Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) TypeList() const; |
89 | |
90 | //! Fills a Check by using its Description |
79104795 |
91 | Standard_EXPORT void Check (Handle(Interface_Check)& ach) const Standard_OVERRIDE; |
42cf5bc1 |
92 | |
93 | //! Fills an EntityIterator with entities shared by <me> |
79104795 |
94 | Standard_EXPORT void Shared (Interface_EntityIterator& list) const Standard_OVERRIDE; |
42cf5bc1 |
95 | |
96 | |
97 | |
98 | |
92efcf78 |
99 | DEFINE_STANDARD_RTTIEXT(StepData_Plex,StepData_Described) |
42cf5bc1 |
100 | |
101 | protected: |
102 | |
103 | |
104 | |
105 | |
106 | private: |
107 | |
108 | |
109 | TColStd_SequenceOfTransient themembers; |
110 | |
111 | |
112 | }; |
113 | |
114 | |
115 | |
116 | |
117 | |
118 | |
119 | |
120 | #endif // _StepData_Plex_HeaderFile |