1 martin 1.55 //%LICENSE////////////////////////////////////////////////////////////////
|
2 martin 1.56 //
|
3 martin 1.55 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
8 // License.
|
9 martin 1.56 //
|
10 martin 1.55 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
|
16 martin 1.56 //
|
17 martin 1.55 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
|
19 martin 1.56 //
|
20 martin 1.55 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
21 martin 1.56 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
22 martin 1.55 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
27 martin 1.56 //
|
28 martin 1.55 //////////////////////////////////////////////////////////////////////////
|
29 mike 1.11 //
30 //%/////////////////////////////////////////////////////////////////////////////
31
32 #ifndef Pegasus_Value_h
33 #define Pegasus_Value_h
34
35 #include <Pegasus/Common/String.h>
36 #include <Pegasus/Common/Config.h>
37 #include <Pegasus/Common/CIMType.h>
|
38 kumpf 1.23 #include <Pegasus/Common/CIMObjectPath.h>
|
39 dave.sudlik 1.41 #include <Pegasus/Common/CIMObject.h>
|
40 mike 1.11 #include <Pegasus/Common/CIMDateTime.h>
|
41 kumpf 1.18 #include <Pegasus/Common/Exception.h>
|
42 mike 1.11 #include <Pegasus/Common/Array.h>
|
43 kumpf 1.29 #include <Pegasus/Common/Linkage.h>
|
44 mike 1.11
45 PEGASUS_NAMESPACE_BEGIN
46
|
47 kumpf 1.18 class CIMValueRep;
|
48 dave.sudlik 1.41 class CIMObject;
|
49 a.dunfey 1.50 class CIMInstance;
|
50 kumpf 1.18
|
51 mike 1.11 /**
|
52 kumpf 1.53 The CIMValue class represents a value of any of the CIM data types.
53 This class encapsulates a union which holds value of any CIMType.
54 A type field indicates the type of the value.
|
55 mike 1.11 */
56 class PEGASUS_COMMON_LINKAGE CIMValue
57 {
58 public:
|
59 kumpf 1.53 /**
60 Constructs a null CIMValue with type Boolean and isArray=false.
|
61 karl 1.15 */
|
62 mike 1.11 CIMValue();
63
|
64 kumpf 1.53 /**
65 Constructs a null CIMValue object with the specified type and
66 array indicator.
67 @param type The CIMType of the value
68 @param isArray A Boolean indicating whether the value is of array type
69 @param arraySize An integer specifying the size of the array, if the
70 CIMValue is for an array of a fixed size. This value is ignored
71 if the isArray argument is false.
|
72 karl 1.15 */
73 CIMValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
74
|
75 kumpf 1.53 /**
76 Constructs a CIMValue with the specified value and inferred type.
77 @param x The Boolean value to assign
78 */
|
79 kumpf 1.18 CIMValue(Boolean x);
|
80 mike 1.11
|
81 kumpf 1.53 /**
82 Constructs a CIMValue with the specified value and inferred type.
83 @param x The Uint8 value to assign
84 */
|
85 kumpf 1.18 CIMValue(Uint8 x);
|
86 mike 1.11
|
87 kumpf 1.53 /**
88 Constructs a CIMValue with the specified value and inferred type.
89 @param x The Sint8 value to assign
90 */
|
91 kumpf 1.18 CIMValue(Sint8 x);
|
92 mike 1.11
|
93 kumpf 1.53 /**
94 Constructs a CIMValue with the specified value and inferred type.
95 @param x The Uint16 value to assign
96 */
|
97 kumpf 1.18 CIMValue(Uint16 x);
|
98 mike 1.11
|
99 kumpf 1.53 /**
100 Constructs a CIMValue with the specified value and inferred type.
101 @param x The Sint16 value to assign
102 */
|
103 kumpf 1.18 CIMValue(Sint16 x);
|
104 mike 1.11
|
105 kumpf 1.53 /**
106 Constructs a CIMValue with the specified value and inferred type.
107 @param x The Uint32 value to assign
108 */
|
109 kumpf 1.18 CIMValue(Uint32 x);
|
110 mike 1.11
|
111 kumpf 1.53 /**
112 Constructs a CIMValue with the specified value and inferred type.
113 @param x The Sint32 value to assign
114 */
|
115 kumpf 1.18 CIMValue(Sint32 x);
|
116 mike 1.11
|
117 kumpf 1.53 /**
118 Constructs a CIMValue with the specified value and inferred type.
119 @param x The Uint64 value to assign
120 */
|
121 kumpf 1.18 CIMValue(Uint64 x);
|
122 mike 1.11
|
123 kumpf 1.53 /**
124 Constructs a CIMValue with the specified value and inferred type.
125 @param x The Sint64 value to assign
126 */
|
127 kumpf 1.18 CIMValue(Sint64 x);
|
128 mike 1.11
|
129 kumpf 1.53 /**
130 Constructs a CIMValue with the specified value and inferred type.
131 @param x The Real32 value to assign
132 */
|
133 kumpf 1.18 CIMValue(Real32 x);
|
134 mike 1.11
|
135 kumpf 1.53 /**
136 Constructs a CIMValue with the specified value and inferred type.
137 @param x The Real64 value to assign
138 */
|
139 kumpf 1.18 CIMValue(Real64 x);
|
140 mike 1.11
|
141 kumpf 1.53 /**
142 Constructs a CIMValue with the specified value and inferred type.
143 @param x The Char16 value to assign
144 */
|
145 kumpf 1.18 CIMValue(const Char16& x);
|
146 mike 1.11
|
147 kumpf 1.53 /**
148 Constructs a CIMValue with the specified value and inferred type.
149 @param x The String value to assign
150 */
|
151 kumpf 1.18 CIMValue(const String& x);
|
152 mike 1.11
|
153 kumpf 1.53 /**
154 Constructs a CIMValue with the specified value and inferred type.
155 @param x The CIMDateTime value to assign
156 */
|
157 kumpf 1.18 CIMValue(const CIMDateTime& x);
|
158 mike 1.11
|
159 kumpf 1.53 /**
160 Constructs a CIMValue with the specified value and inferred type.
161 @param x The CIMObjectPath value to assign
162 */
|
163 kumpf 1.23 CIMValue(const CIMObjectPath& x);
|
164 mike 1.11
|
165 kumpf 1.53 /**
166 Constructs a CIMValue with the specified value and inferred type.
167 Note: The CIMObject argument is cloned to prevent subsequent
168 modification through the shared representation model.
169 @param x The CIMObject value to assign
170 @exception UninitializedObjectException If the CIMObject is
171 uninitialized.
|
172 denise.eckstein 1.46 */
|
173 dave.sudlik 1.41 CIMValue(const CIMObject& x);
174
|
175 kumpf 1.53 /**
176 Constructs a CIMValue with the specified value and inferred type.
177 Note: The CIMInstance argument is cloned to prevent subsequent
178 modification through the shared representation model.
179 @param x The CIMInstance value to assign
180 @exception UninitializedObjectException If the CIMInstance is
181 uninitialized.
182 */
|
183 a.dunfey 1.50 CIMValue(const CIMInstance& x);
184
|
185 kumpf 1.53 /**
186 Constructs a CIMValue with the specified value and inferred type.
187 @param x The Boolean Array value to assign
188 */
|
189 kumpf 1.18 CIMValue(const Array<Boolean>& x);
|
190 mike 1.11
|
191 kumpf 1.53 /**
192 Constructs a CIMValue with the specified value and inferred type.
193 @param x The Uint8 Array value to assign
194 */
|
195 kumpf 1.18 CIMValue(const Array<Uint8>& x);
|
196 mike 1.11
|
197 kumpf 1.53 /**
198 Constructs a CIMValue with the specified value and inferred type.
199 @param x The Sint8 Array value to assign
200 */
|
201 kumpf 1.18 CIMValue(const Array<Sint8>& x);
|
202 mike 1.11
|
203 kumpf 1.53 /**
204 Constructs a CIMValue with the specified value and inferred type.
205 @param x The Uint16 Array value to assign
206 */
|
207 kumpf 1.18 CIMValue(const Array<Uint16>& x);
|
208 mike 1.11
|
209 kumpf 1.53 /**
210 Constructs a CIMValue with the specified value and inferred type.
211 @param x The Sint16 Array value to assign
212 */
|
213 kumpf 1.18 CIMValue(const Array<Sint16>& x);
|
214 mike 1.11
|
215 kumpf 1.53 /**
216 Constructs a CIMValue with the specified value and inferred type.
217 @param x The Uint32 Array value to assign
218 */
|
219 kumpf 1.18 CIMValue(const Array<Uint32>& x);
|
220 mike 1.11
|
221 kumpf 1.53 /**
222 Constructs a CIMValue with the specified value and inferred type.
223 @param x The Sint32 Array value to assign
224 */
|
225 kumpf 1.18 CIMValue(const Array<Sint32>& x);
|
226 mike 1.11
|
227 kumpf 1.53 /**
228 Constructs a CIMValue with the specified value and inferred type.
229 @param x The Uint64 Array value to assign
230 */
|
231 kumpf 1.18 CIMValue(const Array<Uint64>& x);
|
232 mike 1.11
|
233 kumpf 1.53 /**
234 Constructs a CIMValue with the specified value and inferred type.
235 @param x The Sint64 Array value to assign
236 */
|
237 kumpf 1.18 CIMValue(const Array<Sint64>& x);
|
238 mike 1.11
|
239 kumpf 1.53 /**
240 Constructs a CIMValue with the specified value and inferred type.
241 @param x The Real32 Array value to assign
242 */
|
243 kumpf 1.18 CIMValue(const Array<Real32>& x);
|
244 mike 1.11
|
245 kumpf 1.53 /**
246 Constructs a CIMValue with the specified value and inferred type.
247 @param x The Real64 Array value to assign
248 */
|
249 kumpf 1.18 CIMValue(const Array<Real64>& x);
|
250 mike 1.11
|
251 kumpf 1.53 /**
252 Constructs a CIMValue with the specified value and inferred type.
253 @param x The Char16 Array value to assign
254 */
|
255 kumpf 1.18 CIMValue(const Array<Char16>& x);
|
256 mike 1.11
|
257 kumpf 1.53 /**
258 Constructs a CIMValue with the specified value and inferred type.
259 @param x The String Array value to assign
260 */
|
261 kumpf 1.18 CIMValue(const Array<String>& x);
|
262 mike 1.11
|
263 kumpf 1.53 /**
264 Constructs a CIMValue with the specified value and inferred type.
265 @param x The CIMDateTime Array value to assign
266 */
|
267 kumpf 1.18 CIMValue(const Array<CIMDateTime>& x);
|
268 mike 1.11
|
269 kumpf 1.53 /**
270 Constructs a CIMValue with the specified value and inferred type.
271 @param x The CIMObjectPath Array value to assign
272 */
|
273 kumpf 1.23 CIMValue(const Array<CIMObjectPath>& x);
|
274 kumpf 1.14
|
275 kumpf 1.53 /**
276 Constructs a CIMValue with the specified value and inferred type.
277 Note: The CIMObjects in the Array argument are cloned to prevent
278 subsequent modification through the shared representation model.
279 @param x The CIMObject Array value to assign
280 @exception UninitializedObjectException If any of the CIMObjects in the
281 Array are uninitialized.
|
282 denise.eckstein 1.46 */
|
283 dave.sudlik 1.41 CIMValue(const Array<CIMObject>& x);
284
|
285 kumpf 1.53 /**
286 Constructs a CIMValue with the specified value and inferred type.
287 Note: The CIMInstances in the Array argument are cloned to prevent
288 subsequent modification through the shared representation model.
289 @param x The CIMInstance Array value to assign
290 @exception UninitializedObjectException If any of the CIMInstances in
291 the Array are uninitialized.
292 */
|
293 a.dunfey 1.50 CIMValue(const Array<CIMInstance>& x);
294
|
295 kumpf 1.53 /**
296 Constructs a CIMValue by copying another CIMValue object.
297 Note: If the specified CIMValue contains CIMObject or CIMInstance
298 objects, they are cloned to prevent subsequent modification through
299 the shared representation model.
300 @param x The CIMValue object to copy
|
301 denise.eckstein 1.46 */
|
302 mike 1.11 CIMValue(const CIMValue& x);
303
|
304 kumpf 1.53 /**
305 Destructs a CIMValue object.
306 */
|
307 mike 1.11 ~CIMValue();
308
|
309 kumpf 1.53 /**
310 Assigns the value from a specified CIMValue object.
311 Note: If the specified CIMValue contains CIMObject or CIMInstance
312 objects, they are cloned to prevent subsequent modification through
313 the shared representation model.
314 @param x The CIMValue object to copy
315 @return A reference to this CIMValue object with the new assignment
|
316 denise.eckstein 1.46 */
|
317 kumpf 1.18 CIMValue& operator=(const CIMValue& x);
|
318 mike 1.11
|
319 kumpf 1.53 /**
320 Assigns the value from a specified CIMValue object.
321 Note: If the specified CIMValue contains CIMObject or CIMInstance
322 objects, they are cloned to prevent subsequent modification through
323 the shared representation model.
324 @param x The CIMValue object to copy
|
325 karl 1.13 */
|
326 mike 1.11 void assign(const CIMValue& x);
327
|
328 kumpf 1.53 /**
329 Resets to a null value with type Boolean and isArray=false.
|
330 karl 1.13 */
|
331 mike 1.11 void clear();
332
|
333 kumpf 1.53 /**
334 Compares the type and isArray attributes with a specified CIMValue.
335 @param x The CIMValue object with which to compare
336 @return A Boolean indicating whether the CIMValue objects have the same
337 type and isArray attribute value.
|
338 mike 1.11 */
|
339 kumpf 1.18 Boolean typeCompatible(const CIMValue& x) const;
|
340 mike 1.11
|
341 kumpf 1.53 /**
342 Indicates whether the value is an array.
343 @return A Boolean indicating whether the value is an array.
|
344 mike 1.11 */
|
345 kumpf 1.18 Boolean isArray() const;
|
346 mike 1.11
|
347 kumpf 1.53 /**
348 Indicates whether the value is null. A null CIMValue has a type, but
349 no value can be retrieved from it.
350 @return A Boolean indicating whether the value is null.
|
351 mike 1.12 */
|
352 kumpf 1.18 Boolean isNull() const;
|
353 mike 1.12
|
354 kumpf 1.53 /**
355 Gets the fixed array size of a CIMValue. This value is undefined for
356 non-array values. A value of 0 is given for variable size arrays.
357 @return An integer indicating the array size.
|
358 mike 1.11 */
359 Uint32 getArraySize() const;
360
|
361 kumpf 1.53 /**
362 Gets the value type.
363 @return A CIMType indicating the type of the value.
|
364 karl 1.13 */
|
365 kumpf 1.18 CIMType getType() const;
|
366 mike 1.11
|
367 kumpf 1.53 /**
368 Sets the value to null with the specified type and array indicator.
369 @param type The CIMType of the value
370 @param isArray A Boolean indicating whether the value is of array type
371 @param arraySize An integer specifying the size of the array, if the
372 CIMValue is for an array of a fixed size. This value is ignored
373 if the isArray argument is false.
|
374 karl 1.13 */
|
375 mike 1.11 void setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
376
|
377 kumpf 1.53 /**
378 Sets the CIMValue to the specified value and inferred type.
379 @param x The Boolean value to assign
|
380 kumpf 1.51 */
|
381 mike 1.11 void set(Boolean x);
382
|
383 kumpf 1.53 /**
384 Sets the CIMValue to the specified value and inferred type.
385 @param x The Uint8 value to assign
386 */
|
387 mike 1.11 void set(Uint8 x);
|
388 kumpf 1.53
389 /**
390 Sets the CIMValue to the specified value and inferred type.
391 @param x The Sint8 value to assign
392 */
|
393 mike 1.11 void set(Sint8 x);
|
394 kumpf 1.53
395 /**
396 Sets the CIMValue to the specified value and inferred type.
397 @param x The Uint16 value to assign
398 */
|
399 mike 1.11 void set(Uint16 x);
|
400 kumpf 1.53
401 /**
402 Sets the CIMValue to the specified value and inferred type.
403 @param x The Sint16 value to assign
404 */
|
405 mike 1.11 void set(Sint16 x);
|
406 kumpf 1.53
407 /**
408 Sets the CIMValue to the specified value and inferred type.
409 @param x The Uint32 value to assign
410 */
|
411 mike 1.11 void set(Uint32 x);
|
412 kumpf 1.53
413 /**
414 Sets the CIMValue to the specified value and inferred type.
415 @param x The Sint32 value to assign
416 */
|
417 mike 1.11 void set(Sint32 x);
|
418 kumpf 1.53
419 /**
420 Sets the CIMValue to the specified value and inferred type.
421 @param x The Uint64 value to assign
422 */
|
423 mike 1.11 void set(Uint64 x);
|
424 kumpf 1.53
425 /**
426 Sets the CIMValue to the specified value and inferred type.
427 @param x The Sint64 value to assign
428 */
|
429 mike 1.11 void set(Sint64 x);
|
430 kumpf 1.53
431 /**
432 Sets the CIMValue to the specified value and inferred type.
433 @param x The Real32 value to assign
434 */
|
435 mike 1.11 void set(Real32 x);
|
436 kumpf 1.53
437 /**
438 Sets the CIMValue to the specified value and inferred type.
439 @param x The Real64 value to assign
440 */
|
441 mike 1.11 void set(Real64 x);
|
442 kumpf 1.53
443 /**
444 Sets the CIMValue to the specified value and inferred type.
445 @param x The Char16 value to assign
446 */
|
447 mike 1.11 void set(const Char16& x);
|
448 kumpf 1.53
449 /**
450 Sets the CIMValue to the specified value and inferred type.
451 @param x The String value to assign
452 */
|
453 mike 1.11 void set(const String& x);
|
454 kumpf 1.53
455 /**
456 Sets the CIMValue to the specified value and inferred type.
457 @param x The CIMDateTime value to assign
458 */
|
459 mike 1.11 void set(const CIMDateTime& x);
|
460 kumpf 1.53
461 /**
462 Sets the CIMValue to the specified value and inferred type.
463 @param x The CIMObjectPath value to assign
464 */
|
465 kumpf 1.23 void set(const CIMObjectPath& x);
|
466 kumpf 1.53
467 /**
468 Sets the CIMValue to the specified value and inferred type.
469 Note: The CIMObject argument is cloned to prevent subsequent
470 modification through the shared representation model.
471 @param x The CIMObject value to assign
472 @exception UninitializedObjectException If the CIMObject is
473 uninitialized.
474 */
|
475 dave.sudlik 1.41 void set(const CIMObject& x);
|
476 kumpf 1.53
477 /**
478 Sets the CIMValue to the specified value and inferred type.
479 Note: The CIMInstance argument is cloned to prevent subsequent
480 modification through the shared representation model.
481 @param x The CIMInstance value to assign
482 @exception UninitializedObjectException If the CIMInstance is
483 uninitialized.
484 */
|
485 a.dunfey 1.50 void set(const CIMInstance& x);
|
486 kumpf 1.53
487 /**
488 Sets the CIMValue to the specified value and inferred type.
489 @param x The Boolean Array value to assign
490 */
|
491 mike 1.11 void set(const Array<Boolean>& x);
|
492 kumpf 1.53
493 /**
494 Sets the CIMValue to the specified value and inferred type.
495 @param x The Uint8 Array value to assign
496 */
|
497 mike 1.11 void set(const Array<Uint8>& x);
|
498 kumpf 1.53
499 /**
500 Sets the CIMValue to the specified value and inferred type.
501 @param x The Sint8 Array value to assign
502 */
|
503 mike 1.11 void set(const Array<Sint8>& x);
|
504 kumpf 1.53
505 /**
506 Sets the CIMValue to the specified value and inferred type.
507 @param x The Uint16 Array value to assign
508 */
|
509 mike 1.11 void set(const Array<Uint16>& x);
|
510 kumpf 1.53
511 /**
512 Sets the CIMValue to the specified value and inferred type.
513 @param x The Sint16 Array value to assign
514 */
|
515 mike 1.11 void set(const Array<Sint16>& x);
|
516 kumpf 1.53
517 /**
518 Sets the CIMValue to the specified value and inferred type.
519 @param x The Uint32 Array value to assign
520 */
|
521 mike 1.11 void set(const Array<Uint32>& x);
|
522 kumpf 1.53
523 /**
524 Sets the CIMValue to the specified value and inferred type.
525 @param x The Sint32 Array value to assign
526 */
|
527 mike 1.11 void set(const Array<Sint32>& x);
|
528 kumpf 1.53
529 /**
530 Sets the CIMValue to the specified value and inferred type.
531 @param x The Uint64 Array value to assign
532 */
|
533 mike 1.11 void set(const Array<Uint64>& x);
|
534 kumpf 1.53
535 /**
536 Sets the CIMValue to the specified value and inferred type.
537 @param x The Sint64 Array value to assign
538 */
|
539 mike 1.11 void set(const Array<Sint64>& x);
|
540 kumpf 1.53
541 /**
542 Sets the CIMValue to the specified value and inferred type.
543 @param x The Real32 Array value to assign
544 */
|
545 mike 1.11 void set(const Array<Real32>& x);
|
546 kumpf 1.53
547 /**
548 Sets the CIMValue to the specified value and inferred type.
549 @param x The Real64 Array value to assign
550 */
|
551 mike 1.11 void set(const Array<Real64>& x);
|
552 kumpf 1.53
553 /**
554 Sets the CIMValue to the specified value and inferred type.
555 @param x The Char16 Array value to assign
556 */
|
557 mike 1.11 void set(const Array<Char16>& x);
|
558 kumpf 1.53
559 /**
560 Sets the CIMValue to the specified value and inferred type.
561 @param x The String Array value to assign
562 */
|
563 mike 1.11 void set(const Array<String>& x);
|
564 kumpf 1.53
565 /**
566 Sets the CIMValue to the specified value and inferred type.
567 @param x The CIMDateTime Array value to assign
568 */
|
569 mike 1.11 void set(const Array<CIMDateTime>& x);
|
570 kumpf 1.53
571 /**
572 Sets the CIMValue to the specified value and inferred type.
573 @param x The CIMObjectPath Array value to assign
574 */
|
575 kumpf 1.23 void set(const Array<CIMObjectPath>& x);
|
576 kumpf 1.53
577 /**
578 Sets the CIMValue to the specified value and inferred type.
579 Note: The CIMObjects in the Array argument are cloned to prevent
580 subsequent modification through the shared representation model.
581 @param x The CIMObject Array value to assign
582 @exception UninitializedObjectException If any of the CIMObjects in the
583 Array are uninitialized.
584 */
|
585 dave.sudlik 1.41 void set(const Array<CIMObject>& x);
|
586 kumpf 1.53
587 /**
588 Sets the CIMValue to the specified value and inferred type.
589 Note: The CIMInstances in the Array argument are cloned to prevent
590 subsequent modification through the shared representation model.
591 @param x The CIMInstance Array value to assign
592 @exception UninitializedObjectException If any of the CIMInstances in
593 the Array are uninitialized.
594 */
|
595 a.dunfey 1.50 void set(const Array<CIMInstance>& x);
|
596 mike 1.11
|
597 kumpf 1.53 /**
598 Gets the value of the CIMValue. The caller should first verify that
599 the value is of the expected type and is not null. The behavior is
600 undefined for null values.
601 @param x Output Boolean into which the value is stored.
602 @exception TypeMismatchException If the value type does not match the
603 output parameter.
604 */
605 void get(Boolean& x) const;
|
606 kumpf 1.31
|
607 kumpf 1.53 /**
608 Gets the value of the CIMValue. The caller should first verify that
609 the value is of the expected type and is not null. The behavior is
610 undefined for null values.
611 @param x Output Uint8 into which the value is stored.
612 @exception TypeMismatchException If the value type does not match the
613 output parameter.
|
614 karl 1.13 */
|
615 mike 1.11 void get(Uint8& x) const;
|
616 kumpf 1.53
617 /**
618 Gets the value of the CIMValue. The caller should first verify that
619 the value is of the expected type and is not null. The behavior is
620 undefined for null values.
621 @param x Output Sint8 into which the value is stored.
622 @exception TypeMismatchException If the value type does not match the
623 output parameter.
624 */
|
625 mike 1.11 void get(Sint8& x) const;
|
626 kumpf 1.53
627 /**
628 Gets the value of the CIMValue. The caller should first verify that
629 the value is of the expected type and is not null. The behavior is
630 undefined for null values.
631 @param x Output Uint16 into which the value is stored.
632 @exception TypeMismatchException If the value type does not match the
633 output parameter.
634 */
|
635 mike 1.11 void get(Uint16& x) const;
|
636 kumpf 1.53
637 /**
638 Gets the value of the CIMValue. The caller should first verify that
639 the value is of the expected type and is not null. The behavior is
640 undefined for null values.
641 @param x Output Sint16 into which the value is stored.
642 @exception TypeMismatchException If the value type does not match the
643 output parameter.
644 */
|
645 mike 1.11 void get(Sint16& x) const;
|
646 kumpf 1.53
647 /**
648 Gets the value of the CIMValue. The caller should first verify that
649 the value is of the expected type and is not null. The behavior is
650 undefined for null values.
651 <pre>
652 Uint32 v;
653 CIMValue value = property.getValue();
654 if ((value.getType() == CIMTYPE_UINT32) && (!value.isNull()))
655 value.get(v);
656 </pre>
657 @param x Output Uint32 into which the value is stored.
658 @exception TypeMismatchException If the value type does not match the
659 output parameter.
660 */
|
661 mike 1.11 void get(Uint32& x) const;
|
662 kumpf 1.53
663 /**
664 Gets the value of the CIMValue. The caller should first verify that
665 the value is of the expected type and is not null. The behavior is
666 undefined for null values.
667 @param x Output Sint32 into which the value is stored.
668 @exception TypeMismatchException If the value type does not match the
669 output parameter.
670 */
|
671 mike 1.11 void get(Sint32& x) const;
|
672 kumpf 1.53
673 /**
674 Gets the value of the CIMValue. The caller should first verify that
675 the value is of the expected type and is not null. The behavior is
676 undefined for null values.
677 @param x Output Uint64 into which the value is stored.
678 @exception TypeMismatchException If the value type does not match the
679 output parameter.
680 */
|
681 mike 1.11 void get(Uint64& x) const;
|
682 kumpf 1.53
683 /**
684 Gets the value of the CIMValue. The caller should first verify that
685 the value is of the expected type and is not null. The behavior is
686 undefined for null values.
687 @param x Output Sint64 into which the value is stored.
688 @exception TypeMismatchException If the value type does not match the
689 output parameter.
690 */
|
691 mike 1.11 void get(Sint64& x) const;
|
692 kumpf 1.53
693 /**
694 Gets the value of the CIMValue. The caller should first verify that
695 the value is of the expected type and is not null. The behavior is
696 undefined for null values.
697 @param x Output Real32 into which the value is stored.
698 @exception TypeMismatchException If the value type does not match the
699 output parameter.
700 */
|
701 mike 1.11 void get(Real32& x) const;
|
702 kumpf 1.53
703 /**
704 Gets the value of the CIMValue. The caller should first verify that
705 the value is of the expected type and is not null. The behavior is
706 undefined for null values.
707 @param x Output Real64 into which the value is stored.
708 @exception TypeMismatchException If the value type does not match the
709 output parameter.
710 */
|
711 mike 1.11 void get(Real64& x) const;
|
712 kumpf 1.53
713 /**
714 Gets the value of the CIMValue. The caller should first verify that
715 the value is of the expected type and is not null. The behavior is
716 undefined for null values.
717 @param x Output Char16 into which the value is stored.
718 @exception TypeMismatchException If the value type does not match the
719 output parameter.
720 */
|
721 mike 1.11 void get(Char16& x) const;
|
722 kumpf 1.53
723 /**
724 Gets the value of the CIMValue. The caller should first verify that
725 the value is of the expected type and is not null. The behavior is
726 undefined for null values.
727 @param x Output String into which the value is stored.
728 @exception TypeMismatchException If the value type does not match the
729 output parameter.
730 */
|
731 mike 1.11 void get(String& x) const;
|
732 kumpf 1.53
733 /**
734 Gets the value of the CIMValue. The caller should first verify that
735 the value is of the expected type and is not null. The behavior is
736 undefined for null values.
737 @param x Output CIMDateTime into which the value is stored.
738 @exception TypeMismatchException If the value type does not match the
739 output parameter.
740 */
|
741 mike 1.11 void get(CIMDateTime& x) const;
|
742 kumpf 1.53
743 /**
744 Gets the value of the CIMValue. The caller should first verify that
745 the value is of the expected type and is not null. The behavior is
746 undefined for null values.
747 @param x Output CIMObjectPath into which the value is stored.
748 @exception TypeMismatchException If the value type does not match the
749 output parameter.
750 */
|
751 kumpf 1.23 void get(CIMObjectPath& x) const;
|
752 kumpf 1.53
753 /**
754 Gets the value of the CIMValue. The caller should first verify that
755 the value is of the expected type and is not null. The behavior is
756 undefined for null values.
757 @param x Output CIMObject into which the value is stored.
758 @exception TypeMismatchException If the value type does not match the
759 output parameter.
760 */
|
761 dave.sudlik 1.41 void get(CIMObject& x) const;
|
762 kumpf 1.53
763 /**
764 Gets the value of the CIMValue. The caller should first verify that
765 the value is of the expected type and is not null. The behavior is
766 undefined for null values.
767 @param x Output CIMInstance into which the value is stored.
768 @exception TypeMismatchException If the value type does not match the
769 output parameter.
770 */
|
771 a.dunfey 1.50 void get(CIMInstance& x) const;
|
772 kumpf 1.53
773 /**
774 Gets the value of the CIMValue. The caller should first verify that
775 the value is of the expected type and is not null. The behavior is
776 undefined for null values.
777 @param x Output Boolean Array into which the value is stored.
778 @exception TypeMismatchException If the value type does not match the
779 output parameter.
780 */
|
781 mike 1.11 void get(Array<Boolean>& x) const;
|
782 kumpf 1.53
783 /**
784 Gets the value of the CIMValue. The caller should first verify that
785 the value is of the expected type and is not null. The behavior is
786 undefined for null values.
787 @param x Output Uint8 Array into which the value is stored.
788 @exception TypeMismatchException If the value type does not match the
789 output parameter.
790 */
|
791 mike 1.11 void get(Array<Uint8>& x) const;
|
792 kumpf 1.53
793 /**
794 Gets the value of the CIMValue. The caller should first verify that
795 the value is of the expected type and is not null. The behavior is
796 undefined for null values.
797 @param x Output Sint8 Array into which the value is stored.
798 @exception TypeMismatchException If the value type does not match the
799 output parameter.
800 */
|
801 mike 1.11 void get(Array<Sint8>& x) const;
|
802 kumpf 1.53
803 /**
804 Gets the value of the CIMValue. The caller should first verify that
805 the value is of the expected type and is not null. The behavior is
806 undefined for null values.
807 @param x Output Uint16 Array into which the value is stored.
808 @exception TypeMismatchException If the value type does not match the
809 output parameter.
810 */
|
811 mike 1.11 void get(Array<Uint16>& x) const;
|
812 kumpf 1.53
813 /**
814 Gets the value of the CIMValue. The caller should first verify that
815 the value is of the expected type and is not null. The behavior is
816 undefined for null values.
817 @param x Output Sint16 Array into which the value is stored.
818 @exception TypeMismatchException If the value type does not match the
819 output parameter.
820 */
|
821 mike 1.11 void get(Array<Sint16>& x) const;
|
822 kumpf 1.53
823 /**
824 Gets the value of the CIMValue. The caller should first verify that
825 the value is of the expected type and is not null. The behavior is
826 undefined for null values.
827 @param x Output Uint32 Array into which the value is stored.
828 @exception TypeMismatchException If the value type does not match the
829 output parameter.
830 */
|
831 mike 1.11 void get(Array<Uint32>& x) const;
|
832 kumpf 1.53
833 /**
834 Gets the value of the CIMValue. The caller should first verify that
835 the value is of the expected type and is not null. The behavior is
836 undefined for null values.
837 @param x Output Sint32 Array into which the value is stored.
838 @exception TypeMismatchException If the value type does not match the
839 output parameter.
840 */
|
841 mike 1.11 void get(Array<Sint32>& x) const;
|
842 kumpf 1.53
843 /**
844 Gets the value of the CIMValue. The caller should first verify that
845 the value is of the expected type and is not null. The behavior is
846 undefined for null values.
847 @param x Output Uint64 Array into which the value is stored.
848 @exception TypeMismatchException If the value type does not match the
849 output parameter.
850 */
|
851 mike 1.11 void get(Array<Uint64>& x) const;
|
852 kumpf 1.53
853 /**
854 Gets the value of the CIMValue. The caller should first verify that
855 the value is of the expected type and is not null. The behavior is
856 undefined for null values.
857 @param x Output Sint64 Array into which the value is stored.
858 @exception TypeMismatchException If the value type does not match the
859 output parameter.
860 */
|
861 mike 1.11 void get(Array<Sint64>& x) const;
|
862 kumpf 1.53
863 /**
864 Gets the value of the CIMValue. The caller should first verify that
865 the value is of the expected type and is not null. The behavior is
866 undefined for null values.
867 @param x Output Real32 Array into which the value is stored.
868 @exception TypeMismatchException If the value type does not match the
869 output parameter.
870 */
|
871 mike 1.11 void get(Array<Real32>& x) const;
|
872 kumpf 1.53
873 /**
874 Gets the value of the CIMValue. The caller should first verify that
875 the value is of the expected type and is not null. The behavior is
876 undefined for null values.
877 @param x Output Real64 Array into which the value is stored.
878 @exception TypeMismatchException If the value type does not match the
879 output parameter.
880 */
|
881 mike 1.11 void get(Array<Real64>& x) const;
|
882 kumpf 1.53
883 /**
884 Gets the value of the CIMValue. The caller should first verify that
885 the value is of the expected type and is not null. The behavior is
886 undefined for null values.
887 @param x Output Char16 Array into which the value is stored.
888 @exception TypeMismatchException If the value type does not match the
889 output parameter.
890 */
|
891 mike 1.11 void get(Array<Char16>& x) const;
|
892 kumpf 1.53
893 /**
894 Gets the value of the CIMValue. The caller should first verify that
895 the value is of the expected type and is not null. The behavior is
896 undefined for null values.
897 @param x Output String Array into which the value is stored.
898 @exception TypeMismatchException If the value type does not match the
899 output parameter.
900 */
|
901 mike 1.11 void get(Array<String>& x) const;
|
902 kumpf 1.53
903 /**
904 Gets the value of the CIMValue. The caller should first verify that
905 the value is of the expected type and is not null. The behavior is
906 undefined for null values.
907 @param x Output CIMDateTime Array into which the value is stored.
908 @exception TypeMismatchException If the value type does not match the
909 output parameter.
910 */
|
911 kumpf 1.51 void get(Array<CIMDateTime>& x) const;
|
912 kumpf 1.53
913 /**
914 Gets the value of the CIMValue. The caller should first verify that
915 the value is of the expected type and is not null. The behavior is
916 undefined for null values.
917 @param x Output CIMObjectPath Array into which the value is stored.
918 @exception TypeMismatchException If the value type does not match the
919 output parameter.
920 */
|
921 kumpf 1.51 void get(Array<CIMObjectPath>& x) const;
|
922 kumpf 1.53
923 /**
924 Gets the value of the CIMValue. The caller should first verify that
925 the value is of the expected type and is not null. The behavior is
926 undefined for null values.
927 @param x Output CIMObject Array into which the value is stored.
928 @exception TypeMismatchException If the value type does not match the
929 output parameter.
930 */
|
931 kumpf 1.51 void get(Array<CIMObject>& x) const;
|
932 kumpf 1.53
933 /**
934 Gets the value of the CIMValue. The caller should first verify that
935 the value is of the expected type and is not null. The behavior is
936 undefined for null values.
937 @param x Output CIMInstance Array into which the value is stored.
938 @exception TypeMismatchException If the value type does not match the
939 output parameter.
940 */
|
941 kumpf 1.51 void get(Array<CIMInstance>& x) const;
|
942 mike 1.11
|
943 kumpf 1.53 /**
944 Compares with another CIMValue object for equality.
945 @param x The CIMValue with which to compare
946 @return A Boolean indicating whether they are identical in type,
947 array attributes, and value.
|
948 kumpf 1.27 */
949 Boolean equal(const CIMValue& x) const;
|
950 kumpf 1.20
|
951 kumpf 1.53 /**
952 Converts a CIMValue to a String. This method should only be
953 used for diagnostic output purposes. To get an actual String value,
954 use get(String &).
955 @return A String representation of the value.
|
956 kumpf 1.44 */
|
957 mike 1.11 String toString() const;
958
|
959 david.dillard 1.43 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
|
960 kumpf 1.44 /**
961 <I><B>Deprecated Interface</B></I><BR>
|
962 kumpf 1.53 Constructs a CIMValue with the specified value and type Sint8.
963 (Note: This constructor exists solely to support binary compatibility
964 with a previous definition of the Sint8 type.)
965 @param x The Sint8 value to assign
|
966 kumpf 1.44 */
|
967 david.dillard 1.43 CIMValue(char x);
968
|
969 kumpf 1.44 /**
970 <I><B>Deprecated Interface</B></I><BR>
|
971 kumpf 1.53 Constructs a CIMValue with the specified value and type Sint8 Array.
972 (Note: This constructor exists solely to support binary compatibility
973 with a previous definition of the Sint8 type.)
974 @param x The Sint8 Array value to assign
|
975 kumpf 1.44 */
|
976 david.dillard 1.43 CIMValue(const Array<char>& x);
977
|
978 kumpf 1.44 /**
979 <I><B>Deprecated Interface</B></I><BR>
|
980 kumpf 1.53 Sets the CIMValue to the specified value and type Sint8.
981 (Note: This method exists solely to support binary compatibility with
982 a previous definition of the Sint8 type.)
983 @param x The value to assign
|
984 kumpf 1.44 */
|
985 david.dillard 1.43 void set(char x);
986
|
987 kumpf 1.44 /**
988 <I><B>Deprecated Interface</B></I><BR>
|
989 kumpf 1.53 Sets the CIMValue to the specified value and type Sint8 Array.
990 (Note: This method exists solely to support binary compatibility with
991 a previous definition of the Sint8 type.)
992 @param x The Array value to assign
|
993 kumpf 1.44 */
|
994 david.dillard 1.43 void set(const Array<char>& x);
995
|
996 kumpf 1.44 /**
997 <I><B>Deprecated Interface</B></I><BR>
|
998 kumpf 1.53 Gets the Sint8 value of the CIMValue. The caller should first verify
999 that the value is of the expected type and is not null. The behavior
1000 is undefined for null values.
1001 (Note: This method exists solely to support binary compatibility with
1002 a previous definition of the Sint8 type.)
1003 @param x Output variable into which the value is stored.
|
1004 kumpf 1.44 */
|
1005 david.dillard 1.43 void get(char& x) const;
1006
|
1007 kumpf 1.44 /**
1008 <I><B>Deprecated Interface</B></I><BR>
|
1009 kumpf 1.53 Gets the Sint8 Array value of the CIMValue. The caller should first
1010 verify that the value is of the expected type and is not null. The
1011 behavior is undefined for null values.
1012 (Note: This method exists solely to support binary compatibility with
1013 a previous definition of the Sint8 type.)
1014 @param x Output Array variable into which the value is stored.
|
1015 kumpf 1.44 */
|
1016 david.dillard 1.43 void get(Array<char>& x) const;
1017 #endif
1018
|
1019 mike 1.11 private:
1020
|
1021 mike 1.47 void _get(const String*& data, Uint32& size) const;
1022
|
1023 a.arora 1.37 CIMValueRep* _rep;
|
1024 mike 1.11
1025 friend class CIMMethodRep;
1026 friend class CIMParameterRep;
1027 friend class CIMPropertyRep;
1028 friend class CIMQualifierRep;
1029 friend class CIMQualifierDeclRep;
|
1030 schuur 1.38 friend class BinaryStreamer;
|
1031 mike 1.47 friend class XmlWriter;
|
1032 thilo.boehm 1.57 friend class SCMOClass;
1033 friend class SCMOInstance;
|
1034 mike 1.11 };
|
1035 kumpf 1.18
|
1036 kumpf 1.53 /**
1037 Compares two CIMValue objects for equality.
1038 @param x First CIMValue to compare
1039 @param y Second CIMValue to compare
1040 @return A Boolean indicating whether they are identical in type, array
1041 attributes, and value.
|
1042 karl 1.17 */
|
1043 mike 1.11 PEGASUS_COMMON_LINKAGE Boolean operator==(const CIMValue& x, const CIMValue& y);
1044
|
1045 kumpf 1.53 /**
1046 Compares two CIMValue objects for inequality.
1047 @param x First CIMValue to compare
1048 @param y Second CIMValue to compare
1049 @return A Boolean indicating whether they are NOT identical in type, array
1050 attributes, and value.
|
1051 karl 1.17 */
|
1052 kumpf 1.18 PEGASUS_COMMON_LINKAGE Boolean operator!=(const CIMValue& x, const CIMValue& y);
|
1053 mike 1.11
1054 #define PEGASUS_ARRAY_T CIMValue
|
1055 kumpf 1.24 # include <Pegasus/Common/ArrayInter.h>
|
1056 mike 1.11 #undef PEGASUS_ARRAY_T
1057
1058 PEGASUS_NAMESPACE_END
1059
|
1060 mike 1.48 #ifdef PEGASUS_INTERNALONLY
1061 #include <Pegasus/Common/CIMValueInline.h>
1062 #endif
1063
|
1064 mike 1.11 #endif /* Pegasus_Value_h */
|