0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / StepBasic / StepBasic_Action.cxx
1 // Created on: 1999-11-26
2 // Created by: Andrey BETENEV
3 // Copyright (c) 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 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.0
18
19 #include <Standard_Type.hxx>
20 #include <StepBasic_Action.hxx>
21 #include <StepBasic_ActionMethod.hxx>
22 #include <TCollection_HAsciiString.hxx>
23
24 IMPLEMENT_STANDARD_RTTIEXT(StepBasic_Action,Standard_Transient)
25
26 //=======================================================================
27 //function : StepBasic_Action
28 //purpose  : 
29 //=======================================================================
30 StepBasic_Action::StepBasic_Action ()
31 {
32   defDescription = Standard_False;
33 }
34
35 //=======================================================================
36 //function : Init
37 //purpose  : 
38 //=======================================================================
39
40 void StepBasic_Action::Init (const Handle(TCollection_HAsciiString) &aName,
41                              const Standard_Boolean hasDescription,
42                              const Handle(TCollection_HAsciiString) &aDescription,
43                              const Handle(StepBasic_ActionMethod) &aChosenMethod)
44 {
45
46   theName = aName;
47
48   defDescription = hasDescription;
49   if (defDescription) {
50     theDescription = aDescription;
51   }
52   else theDescription.Nullify();
53
54   theChosenMethod = aChosenMethod;
55 }
56
57 //=======================================================================
58 //function : Name
59 //purpose  : 
60 //=======================================================================
61
62 Handle(TCollection_HAsciiString) StepBasic_Action::Name () const
63 {
64   return theName;
65 }
66
67 //=======================================================================
68 //function : SetName
69 //purpose  : 
70 //=======================================================================
71
72 void StepBasic_Action::SetName (const Handle(TCollection_HAsciiString) &aName)
73 {
74   theName = aName;
75 }
76
77 //=======================================================================
78 //function : Description
79 //purpose  : 
80 //=======================================================================
81
82 Handle(TCollection_HAsciiString) StepBasic_Action::Description () const
83 {
84   return theDescription;
85 }
86
87 //=======================================================================
88 //function : SetDescription
89 //purpose  : 
90 //=======================================================================
91
92 void StepBasic_Action::SetDescription (const Handle(TCollection_HAsciiString) &aDescription)
93 {
94   theDescription = aDescription;
95 }
96
97 //=======================================================================
98 //function : HasDescription
99 //purpose  : 
100 //=======================================================================
101
102 Standard_Boolean StepBasic_Action::HasDescription () const
103 {
104   return defDescription;
105 }
106
107 //=======================================================================
108 //function : ChosenMethod
109 //purpose  : 
110 //=======================================================================
111
112 Handle(StepBasic_ActionMethod) StepBasic_Action::ChosenMethod () const
113 {
114   return theChosenMethod;
115 }
116
117 //=======================================================================
118 //function : SetChosenMethod
119 //purpose  : 
120 //=======================================================================
121
122 void StepBasic_Action::SetChosenMethod (const Handle(StepBasic_ActionMethod) &aChosenMethod)
123 {
124   theChosenMethod = aChosenMethod;
125 }