1 karl 1.27 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.9 //
|
3 karl 1.25 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.24 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.25 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.26 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.27 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.9 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.15 // of this software and associated documentation files (the "Software"), to
16 // deal in the Software without restriction, including without limitation the
17 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
18 mike 1.9 // sell copies of the Software, and to permit persons to whom the Software is
19 // furnished to do so, subject to the following conditions:
20 //
|
21 kumpf 1.15 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.9 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
23 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
24 kumpf 1.15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
25 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
26 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
27 mike 1.9 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 //
30 //==============================================================================
31 //
32 //%/////////////////////////////////////////////////////////////////////////////
33
34 #include "CIMMethod.h"
|
35 kumpf 1.10 #include "CIMMethodRep.h"
|
36 mike 1.9
37 PEGASUS_NAMESPACE_BEGIN
38
39 #define PEGASUS_ARRAY_T CIMMethod
40 # include "ArrayImpl.h"
41 #undef PEGASUS_ARRAY_T
42
|
43 kumpf 1.10 ///////////////////////////////////////////////////////////////////////////////
44 //
45 // CIMMethod
46 //
47 ///////////////////////////////////////////////////////////////////////////////
48
49 CIMMethod::CIMMethod()
50 : _rep(0)
51 {
52 }
53
54 CIMMethod::CIMMethod(const CIMMethod& x)
55 {
56 Inc(_rep = x._rep);
57 }
58
59 CIMMethod::CIMMethod(
|
60 kumpf 1.18 const CIMName& name,
|
61 kumpf 1.10 CIMType type,
|
62 kumpf 1.18 const CIMName& classOrigin,
|
63 kumpf 1.10 Boolean propagated)
64 {
65 _rep = new CIMMethodRep(name, type, classOrigin, propagated);
66 }
67
68 CIMMethod::CIMMethod(CIMMethodRep* rep)
69 : _rep(rep)
70 {
71 }
72
73 CIMMethod::~CIMMethod()
74 {
75 Dec(_rep);
76 }
77
78 CIMMethod& CIMMethod::operator=(const CIMMethod& x)
79 {
80 if (x._rep != _rep)
81 {
82 Dec(_rep);
83 Inc(_rep = x._rep);
84 kumpf 1.10 }
85 return *this;
86 }
87
|
88 kumpf 1.18 const CIMName& CIMMethod::getName() const
|
89 kumpf 1.10 {
|
90 marek 1.29 CheckRep(_rep);
|
91 kumpf 1.10 return _rep->getName();
92 }
93
|
94 kumpf 1.18 void CIMMethod::setName(const CIMName& name)
|
95 kumpf 1.10 {
|
96 marek 1.29 CheckRep(_rep);
|
97 kumpf 1.10 _rep->setName(name);
98 }
99
100 CIMType CIMMethod::getType() const
101 {
|
102 marek 1.29 CheckRep(_rep);
|
103 kumpf 1.10 return _rep->getType();
104 }
105
106 void CIMMethod::setType(CIMType type)
107 {
|
108 marek 1.29 CheckRep(_rep);
|
109 kumpf 1.10 _rep->setType(type);
110 }
111
|
112 kumpf 1.18 const CIMName& CIMMethod::getClassOrigin() const
|
113 kumpf 1.10 {
|
114 marek 1.29 CheckRep(_rep);
|
115 kumpf 1.10 return _rep->getClassOrigin();
116 }
117
|
118 kumpf 1.18 void CIMMethod::setClassOrigin(const CIMName& classOrigin)
|
119 kumpf 1.10 {
|
120 marek 1.29 CheckRep(_rep);
|
121 kumpf 1.10 _rep->setClassOrigin(classOrigin);
122 }
123
124 Boolean CIMMethod::getPropagated() const
125 {
|
126 marek 1.29 CheckRep(_rep);
|
127 kumpf 1.10 return _rep->getPropagated();
128 }
129
130 void CIMMethod::setPropagated(Boolean propagated)
131 {
|
132 marek 1.29 CheckRep(_rep);
|
133 kumpf 1.10 _rep->setPropagated(propagated);
134 }
135
136 CIMMethod& CIMMethod::addQualifier(const CIMQualifier& x)
137 {
|
138 marek 1.29 CheckRep(_rep);
|
139 kumpf 1.10 _rep->addQualifier(x);
140 return *this;
141 }
142
|
143 kumpf 1.18 Uint32 CIMMethod::findQualifier(const CIMName& name) const
|
144 kumpf 1.10 {
|
145 marek 1.29 CheckRep(_rep);
|
146 kumpf 1.10 return _rep->findQualifier(name);
147 }
148
|
149 kumpf 1.23 CIMQualifier CIMMethod::getQualifier(Uint32 index)
|
150 kumpf 1.10 {
|
151 marek 1.29 CheckRep(_rep);
|
152 kumpf 1.23 return _rep->getQualifier(index);
|
153 kumpf 1.10 }
154
|
155 kumpf 1.23 CIMConstQualifier CIMMethod::getQualifier(Uint32 index) const
|
156 kumpf 1.10 {
|
157 marek 1.29 CheckRep(_rep);
|
158 kumpf 1.23 return _rep->getQualifier(index);
|
159 kumpf 1.10 }
160
|
161 kumpf 1.23 void CIMMethod::removeQualifier(Uint32 index)
|
162 kumpf 1.10 {
|
163 marek 1.29 CheckRep(_rep);
|
164 kumpf 1.23 _rep->removeQualifier(index);
|
165 kumpf 1.10 }
166
167 Uint32 CIMMethod::getQualifierCount() const
168 {
|
169 marek 1.29 CheckRep(_rep);
|
170 kumpf 1.10 return _rep->getQualifierCount();
171 }
172
173 CIMMethod& CIMMethod::addParameter(const CIMParameter& x)
174 {
|
175 marek 1.29 CheckRep(_rep);
|
176 kumpf 1.10 _rep->addParameter(x);
177 return *this;
178 }
179
|
180 kumpf 1.18 Uint32 CIMMethod::findParameter(const CIMName& name) const
|
181 kumpf 1.10 {
|
182 marek 1.29 CheckRep(_rep);
|
183 kumpf 1.10 return _rep->findParameter(name);
184 }
185
|
186 kumpf 1.23 CIMParameter CIMMethod::getParameter(Uint32 index)
|
187 kumpf 1.10 {
|
188 marek 1.29 CheckRep(_rep);
|
189 kumpf 1.23 return _rep->getParameter(index);
|
190 kumpf 1.10 }
191
|
192 kumpf 1.23 CIMConstParameter CIMMethod::getParameter(Uint32 index) const
|
193 kumpf 1.10 {
|
194 marek 1.29 CheckRep(_rep);
|
195 kumpf 1.23 return _rep->getParameter(index);
|
196 kumpf 1.10 }
197
|
198 kumpf 1.23 void CIMMethod::removeParameter (Uint32 index)
|
199 kumpf 1.20 {
|
200 marek 1.29 CheckRep(_rep);
|
201 kumpf 1.23 _rep->removeParameter (index);
|
202 kumpf 1.20 }
203
|
204 kumpf 1.10 Uint32 CIMMethod::getParameterCount() const
205 {
|
206 marek 1.29 CheckRep(_rep);
|
207 kumpf 1.10 return _rep->getParameterCount();
208 }
209
|
210 kumpf 1.19 Boolean CIMMethod::isUninitialized() const
|
211 kumpf 1.10 {
|
212 kumpf 1.28 return _rep == 0;
|
213 kumpf 1.10 }
214
|
215 mike 1.9 Boolean CIMMethod::identical(const CIMConstMethod& x) const
216 {
|
217 marek 1.29 CheckRep(x._rep);
218 CheckRep(_rep);
|
219 mike 1.9 return _rep->identical(x._rep);
|
220 kumpf 1.10 }
221
222 CIMMethod CIMMethod::clone() const
223 {
224 return CIMMethod(_rep->clone());
225 }
226
227
228 ///////////////////////////////////////////////////////////////////////////////
229 //
230 // CIMConstMethod
231 //
232 ///////////////////////////////////////////////////////////////////////////////
233
234 CIMConstMethod::CIMConstMethod()
235 : _rep(0)
236 {
237 }
238
239 CIMConstMethod::CIMConstMethod(const CIMConstMethod& x)
240 {
241 kumpf 1.10 Inc(_rep = x._rep);
242 }
243
244 CIMConstMethod::CIMConstMethod(const CIMMethod& x)
245 {
246 Inc(_rep = x._rep);
247 }
248
249 CIMConstMethod::CIMConstMethod(
|
250 kumpf 1.18 const CIMName& name,
|
251 kumpf 1.10 CIMType type,
|
252 kumpf 1.18 const CIMName& classOrigin,
|
253 kumpf 1.10 Boolean propagated)
254 {
255 _rep = new CIMMethodRep(name, type, classOrigin, propagated);
256 }
257
258 CIMConstMethod::~CIMConstMethod()
259 {
260 Dec(_rep);
261 }
262
263 CIMConstMethod& CIMConstMethod::operator=(const CIMConstMethod& x)
264 {
265 if (x._rep != _rep)
266 {
267 Dec(_rep);
268 Inc(_rep = x._rep);
269 }
270 return *this;
271 }
272
273 CIMConstMethod& CIMConstMethod::operator=(const CIMMethod& x)
274 kumpf 1.10 {
275 if (x._rep != _rep)
276 {
277 Dec(_rep);
278 Inc(_rep = x._rep);
279 }
280 return *this;
281 }
282
|
283 kumpf 1.18 const CIMName& CIMConstMethod::getName() const
|
284 kumpf 1.10 {
|
285 marek 1.29 CheckRep(_rep);
|
286 kumpf 1.10 return _rep->getName();
287 }
288
289 CIMType CIMConstMethod::getType() const
290 {
|
291 marek 1.29 CheckRep(_rep);
|
292 kumpf 1.10 return _rep->getType();
293 }
294
|
295 kumpf 1.18 const CIMName& CIMConstMethod::getClassOrigin() const
|
296 kumpf 1.10 {
|
297 marek 1.29 CheckRep(_rep);
|
298 kumpf 1.10 return _rep->getClassOrigin();
299 }
300
301 Boolean CIMConstMethod::getPropagated() const
302 {
|
303 marek 1.29 CheckRep(_rep);
|
304 kumpf 1.10 return _rep->getPropagated();
305 }
306
|
307 kumpf 1.18 Uint32 CIMConstMethod::findQualifier(const CIMName& name) const
|
308 kumpf 1.10 {
|
309 marek 1.29 CheckRep(_rep);
|
310 kumpf 1.10 return _rep->findQualifier(name);
311 }
312
|
313 kumpf 1.23 CIMConstQualifier CIMConstMethod::getQualifier(Uint32 index) const
|
314 kumpf 1.10 {
|
315 marek 1.29 CheckRep(_rep);
|
316 kumpf 1.23 return _rep->getQualifier(index);
|
317 kumpf 1.10 }
318
319 Uint32 CIMConstMethod::getQualifierCount() const
320 {
|
321 marek 1.29 CheckRep(_rep);
|
322 kumpf 1.10 return _rep->getQualifierCount();
323 }
324
|
325 kumpf 1.18 Uint32 CIMConstMethod::findParameter(const CIMName& name) const
|
326 kumpf 1.10 {
|
327 marek 1.29 CheckRep(_rep);
|
328 kumpf 1.10 return _rep->findParameter(name);
329 }
330
|
331 kumpf 1.23 CIMConstParameter CIMConstMethod::getParameter(Uint32 index) const
|
332 kumpf 1.10 {
|
333 marek 1.29 CheckRep(_rep);
|
334 kumpf 1.23 return _rep->getParameter(index);
|
335 kumpf 1.10 }
336
337 Uint32 CIMConstMethod::getParameterCount() const
338 {
|
339 marek 1.29 CheckRep(_rep);
|
340 kumpf 1.10 return _rep->getParameterCount();
341 }
342
|
343 kumpf 1.19 Boolean CIMConstMethod::isUninitialized() const
|
344 kumpf 1.10 {
|
345 kumpf 1.28 return _rep == 0;
|
346 kumpf 1.10 }
347
348 Boolean CIMConstMethod::identical(const CIMConstMethod& x) const
349 {
|
350 marek 1.29 CheckRep(x._rep);
351 CheckRep(_rep);
|
352 kumpf 1.10 return _rep->identical(x._rep);
353 }
354
355 CIMMethod CIMConstMethod::clone() const
356 {
357 return CIMMethod(_rep->clone());
358 }
359
|
360 mike 1.9 PEGASUS_NAMESPACE_END
|