28a73c1f |
1 | // Created on: 2015-07-10 |
2 | // Created by: Irina KRYLOVA |
3 | // Copyright (c) 2015 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile |
17 | #define _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_Type.hxx> |
21 | |
22 | #include <MMgt_TShared.hxx> |
23 | #include <StepAP242_ItemIdentifiedRepresentationUsageDefinition.hxx> |
24 | #include <Standard_Integer.hxx> |
25 | #include <StepRepr_HArray1OfRepresentationItem.hxx> |
26 | |
27 | class TCollection_HAsciiString; |
28 | class StepRepr_Representation; |
29 | class StepAP242_ItemIdentifiedRepresentationUsageDefinition; |
30 | class StepRepr_RepresentationItem; |
31 | |
32 | class StepAP242_ItemIdentifiedRepresentationUsage; |
33 | DEFINE_STANDARD_HANDLE(StepAP242_ItemIdentifiedRepresentationUsage, MMgt_TShared) |
34 | class StepAP242_ItemIdentifiedRepresentationUsage : public MMgt_TShared |
35 | { |
36 | |
37 | public: |
38 | |
39 | //! Returns a ItemIdentifiedRepresentationUsage |
40 | Standard_EXPORT StepAP242_ItemIdentifiedRepresentationUsage(); |
41 | |
42 | //! Init all fields own and inherited |
43 | Standard_EXPORT virtual void Init (const Handle(TCollection_HAsciiString)& theName, const Handle(TCollection_HAsciiString)& theDescription, const StepAP242_ItemIdentifiedRepresentationUsageDefinition& theDefinition, const Handle(StepRepr_Representation)& theUsedRepresentation, const Handle(StepRepr_HArray1OfRepresentationItem)& theIdentifiedItem) ; |
44 | |
45 | //! Set field Name |
46 | inline void SetName(const Handle(TCollection_HAsciiString)& theName) |
47 | { |
48 | name = theName; |
49 | } |
50 | |
51 | //! Returns field Name |
52 | inline Handle(TCollection_HAsciiString) Name() const |
53 | { |
54 | return name; |
55 | } |
56 | |
57 | //! Set field Description |
58 | inline void SetDescription(const Handle(TCollection_HAsciiString)& theDescription) |
59 | { |
60 | description = theDescription; |
61 | } |
62 | |
63 | //! Returns field Description |
64 | inline Handle(TCollection_HAsciiString) Description() const |
65 | { |
66 | return description; |
67 | } |
68 | |
69 | //! Set field Definition |
70 | inline void SetDefinition(const StepAP242_ItemIdentifiedRepresentationUsageDefinition& theDefinition) |
71 | { |
72 | definition = theDefinition; |
73 | } |
74 | |
75 | //! Returns field Definition |
76 | inline StepAP242_ItemIdentifiedRepresentationUsageDefinition Definition() const |
77 | { |
78 | return definition; |
79 | } |
80 | |
81 | //! Set field UsedRepresentation |
82 | inline void SetUsedRepresentation(const Handle(StepRepr_Representation)& theUsedRepresentation) |
83 | { |
84 | usedRepresentation = theUsedRepresentation; |
85 | } |
86 | |
87 | //! Retuns field UsedRepresentation |
88 | inline Handle(StepRepr_Representation) UsedRepresentation() const |
89 | { |
90 | return usedRepresentation; |
91 | } |
92 | |
93 | //! Returns field IdentifiedItem |
94 | inline Handle(StepRepr_HArray1OfRepresentationItem) IdentifiedItem () const |
95 | { |
96 | return identifiedItem; |
97 | } |
98 | |
99 | //! Returns number of identified items |
100 | inline Standard_Integer NbIdentifiedItem () const |
101 | { |
102 | return (identifiedItem.IsNull() ? 0 : identifiedItem->Length()); |
103 | } |
104 | |
105 | //! Set fiels IdentifiedItem |
106 | inline void SetIdentifiedItem (const Handle(StepRepr_HArray1OfRepresentationItem)& theIdentifiedItem) |
107 | { |
108 | identifiedItem = theIdentifiedItem; |
109 | } |
110 | |
111 | //! Returns identified item with given number |
112 | inline Handle(StepRepr_RepresentationItem) IdentifiedItemValue |
113 | (const Standard_Integer num) const |
114 | { |
115 | return identifiedItem->Value(num); |
116 | } |
117 | |
118 | //! Set identified item with given number |
119 | inline void SetIdentifiedItemValue (const Standard_Integer num, const Handle(StepRepr_RepresentationItem)& theItem) |
120 | { |
121 | identifiedItem->SetValue (num, theItem); |
122 | } |
123 | |
124 | DEFINE_STANDARD_RTTI(StepAP242_ItemIdentifiedRepresentationUsage, MMgt_TShared) |
125 | |
126 | private: |
127 | Handle(TCollection_HAsciiString) name; |
128 | Handle(TCollection_HAsciiString) description; |
129 | StepAP242_ItemIdentifiedRepresentationUsageDefinition definition; |
130 | Handle(StepRepr_Representation) usedRepresentation; |
131 | Handle(StepRepr_HArray1OfRepresentationItem) identifiedItem; |
132 | }; |
133 | #endif // _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile |