0028832: MMgt_TShared can be replaced by Standard_Transient
[occt.git] / src / StepBasic / StepBasic_GroupRelationship.cxx
1 // Created on: 2000-05-10
2 // Created by: Andrey BETENEV
3 // Copyright (c) 2000-2014 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 // Generator:   ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
17
18 #include <Standard_Type.hxx>
19 #include <StepBasic_Group.hxx>
20 #include <StepBasic_GroupRelationship.hxx>
21 #include <TCollection_HAsciiString.hxx>
22
23 IMPLEMENT_STANDARD_RTTIEXT(StepBasic_GroupRelationship,Standard_Transient)
24
25 //=======================================================================
26 //function : StepBasic_GroupRelationship
27 //purpose  : 
28 //=======================================================================
29 StepBasic_GroupRelationship::StepBasic_GroupRelationship ()
30 {
31   defDescription = Standard_False;
32 }
33
34 //=======================================================================
35 //function : Init
36 //purpose  : 
37 //=======================================================================
38
39 void StepBasic_GroupRelationship::Init (const Handle(TCollection_HAsciiString) &aName,
40                                         const Standard_Boolean hasDescription,
41                                         const Handle(TCollection_HAsciiString) &aDescription,
42                                         const Handle(StepBasic_Group) &aRelatingGroup,
43                                         const Handle(StepBasic_Group) &aRelatedGroup)
44 {
45
46   theName = aName;
47
48   defDescription = hasDescription;
49   if (defDescription) {
50     theDescription = aDescription;
51   }
52   else theDescription.Nullify();
53
54   theRelatingGroup = aRelatingGroup;
55
56   theRelatedGroup = aRelatedGroup;
57 }
58
59 //=======================================================================
60 //function : Name
61 //purpose  : 
62 //=======================================================================
63
64 Handle(TCollection_HAsciiString) StepBasic_GroupRelationship::Name () const
65 {
66   return theName;
67 }
68
69 //=======================================================================
70 //function : SetName
71 //purpose  : 
72 //=======================================================================
73
74 void StepBasic_GroupRelationship::SetName (const Handle(TCollection_HAsciiString) &aName)
75 {
76   theName = aName;
77 }
78
79 //=======================================================================
80 //function : Description
81 //purpose  : 
82 //=======================================================================
83
84 Handle(TCollection_HAsciiString) StepBasic_GroupRelationship::Description () const
85 {
86   return theDescription;
87 }
88
89 //=======================================================================
90 //function : SetDescription
91 //purpose  : 
92 //=======================================================================
93
94 void StepBasic_GroupRelationship::SetDescription (const Handle(TCollection_HAsciiString) &aDescription)
95 {
96   theDescription = aDescription;
97 }
98
99 //=======================================================================
100 //function : HasDescription
101 //purpose  : 
102 //=======================================================================
103
104 Standard_Boolean StepBasic_GroupRelationship::HasDescription () const
105 {
106   return defDescription;
107 }
108
109 //=======================================================================
110 //function : RelatingGroup
111 //purpose  : 
112 //=======================================================================
113
114 Handle(StepBasic_Group) StepBasic_GroupRelationship::RelatingGroup () const
115 {
116   return theRelatingGroup;
117 }
118
119 //=======================================================================
120 //function : SetRelatingGroup
121 //purpose  : 
122 //=======================================================================
123
124 void StepBasic_GroupRelationship::SetRelatingGroup (const Handle(StepBasic_Group) &aRelatingGroup)
125 {
126   theRelatingGroup = aRelatingGroup;
127 }
128
129 //=======================================================================
130 //function : RelatedGroup
131 //purpose  : 
132 //=======================================================================
133
134 Handle(StepBasic_Group) StepBasic_GroupRelationship::RelatedGroup () const
135 {
136   return theRelatedGroup;
137 }
138
139 //=======================================================================
140 //function : SetRelatedGroup
141 //purpose  : 
142 //=======================================================================
143
144 void StepBasic_GroupRelationship::SetRelatedGroup (const Handle(StepBasic_Group) &aRelatedGroup)
145 {
146   theRelatedGroup = aRelatedGroup;
147 }