0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / StepAP242 / StepAP242_ItemIdentifiedRepresentationUsage.hxx
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 <Standard_Transient.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, Standard_Transient)
34 class StepAP242_ItemIdentifiedRepresentationUsage : public Standard_Transient
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 void Init (const Handle(TCollection_HAsciiString)& theName,
44                              const Handle(TCollection_HAsciiString)& theDescription,
45                              const StepAP242_ItemIdentifiedRepresentationUsageDefinition& theDefinition,
46                              const Handle(StepRepr_Representation)& theUsedRepresentation,
47                              const Handle(StepRepr_HArray1OfRepresentationItem)& theIdentifiedItem);
48   
49   //! Set field Name
50   inline void SetName(const Handle(TCollection_HAsciiString)& theName)
51   {
52     name = theName;
53   }
54   
55   //! Returns field Name
56   inline Handle(TCollection_HAsciiString) Name() const
57   {
58     return name;
59   }
60   
61   //! Set field Description
62   inline void SetDescription(const Handle(TCollection_HAsciiString)& theDescription)
63   {
64     description = theDescription;
65   }
66   
67   //! Returns field Description
68   inline Handle(TCollection_HAsciiString) Description() const
69   {
70     return description;
71   }
72   
73   //! Set field Definition
74   inline void SetDefinition(const StepAP242_ItemIdentifiedRepresentationUsageDefinition& theDefinition)
75   {
76     definition = theDefinition;
77   }
78   
79   //! Returns field Definition
80   inline StepAP242_ItemIdentifiedRepresentationUsageDefinition Definition() const
81   {
82     return definition;
83   }
84   
85   //! Set field UsedRepresentation
86   inline void SetUsedRepresentation(const Handle(StepRepr_Representation)& theUsedRepresentation)
87   {
88     usedRepresentation = theUsedRepresentation;
89   }
90   
91   //! Retuns field UsedRepresentation
92   inline Handle(StepRepr_Representation) UsedRepresentation() const
93   {
94     return usedRepresentation;
95   }
96   
97   //! Returns field IdentifiedItem
98   inline Handle(StepRepr_HArray1OfRepresentationItem) IdentifiedItem () const
99   {  
100     return identifiedItem;
101   }
102   
103   //! Returns number of identified items
104   inline Standard_Integer  NbIdentifiedItem () const
105   {  
106     return (identifiedItem.IsNull() ? 0 : identifiedItem->Length());
107   }
108   
109   //! Set fiels IdentifiedItem
110   inline void SetIdentifiedItem (const Handle(StepRepr_HArray1OfRepresentationItem)& theIdentifiedItem)
111   {  
112     identifiedItem = theIdentifiedItem;
113   }
114   
115   //! Returns identified item with given number
116   inline Handle(StepRepr_RepresentationItem) IdentifiedItemValue
117     (const Standard_Integer num) const
118   {  
119     return identifiedItem->Value(num);
120   }
121   
122   //! Set identified item with given number
123   inline void SetIdentifiedItemValue (const Standard_Integer num, const Handle(StepRepr_RepresentationItem)& theItem)
124   {  
125     identifiedItem->SetValue (num, theItem);
126   }
127
128   DEFINE_STANDARD_RTTIEXT(StepAP242_ItemIdentifiedRepresentationUsage,Standard_Transient)
129
130 private: 
131   Handle(TCollection_HAsciiString) name;
132   Handle(TCollection_HAsciiString) description;
133   StepAP242_ItemIdentifiedRepresentationUsageDefinition definition;
134   Handle(StepRepr_Representation) usedRepresentation;
135   Handle(StepRepr_HArray1OfRepresentationItem) identifiedItem;
136 };
137 #endif // _StepAP242_ItemIdentifiedRepresentationUsage_HeaderFile