1 karl 1.49 //%2006////////////////////////////////////////////////////////////////////////
|
2 mike 1.11 //
|
3 karl 1.40 // 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.35 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.40 // 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.42 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 karl 1.49 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
12 // EMC Corporation; Symantec Corporation; The Open Group.
|
13 mike 1.11 //
14 // Permission is hereby granted, free of charge, to any person obtaining a copy
|
15 kumpf 1.25 // 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.11 // 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.25 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
|
22 mike 1.11 // 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.25 // 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.11 // 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 #ifndef Pegasus_Value_h
35 #define Pegasus_Value_h
36
37 #include <Pegasus/Common/String.h>
38 #include <Pegasus/Common/Config.h>
39 #include <Pegasus/Common/CIMType.h>
|
40 kumpf 1.23 #include <Pegasus/Common/CIMObjectPath.h>
|
41 dave.sudlik 1.41 #include <Pegasus/Common/CIMObject.h>
|
42 mike 1.11 #include <Pegasus/Common/CIMDateTime.h>
|
43 kumpf 1.18 #include <Pegasus/Common/Exception.h>
|
44 mike 1.11 #include <Pegasus/Common/Array.h>
|
45 kumpf 1.29 #include <Pegasus/Common/Linkage.h>
|
46 mike 1.11
47 PEGASUS_NAMESPACE_BEGIN
48
|
49 kumpf 1.18 class CIMValueRep;
|
50 dave.sudlik 1.41 class CIMObject;
|
51 a.dunfey 1.50 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
52 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
53 class CIMInstance;
54 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
55 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
56 kumpf 1.18
|
57 mike 1.11 /**
58 The CIMValue class represents a value of any of the CIM data types
|
59 kumpf 1.34 (see \Ref{CIMType} for a list of valid CIM data types). This class
|
60 mike 1.11 encapsulates a union which holds the current value. The class also
61 has a type field indicating the type of that value.
62 */
63 class PEGASUS_COMMON_LINKAGE CIMValue
64 {
65 public:
|
66 kumpf 1.34 /** Constructor - Creates an NULL CIMValue object set to null and
67 with type CIMType:none and !arraytype.
|
68 karl 1.15 */
|
69 mike 1.11 CIMValue();
70
|
71 kumpf 1.34 /** Constructor - Creates a NULL CIMValue object with the type and
|
72 kumpf 1.32 array indicator set as specified.
73 @exception TypeMismatchException If the given type is not valid for a
74 CIMValue object.
|
75 karl 1.15 */
76 CIMValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
77
|
78 kumpf 1.34 /// Constructor.
|
79 kumpf 1.18 CIMValue(Boolean x);
|
80 mike 1.11
|
81 kumpf 1.34 /// Constructor.
|
82 kumpf 1.18 CIMValue(Uint8 x);
|
83 mike 1.11
|
84 kumpf 1.34 /// Constructor.
|
85 kumpf 1.18 CIMValue(Sint8 x);
|
86 mike 1.11
|
87 kumpf 1.34 /// Constructor.
|
88 kumpf 1.18 CIMValue(Uint16 x);
|
89 mike 1.11
|
90 kumpf 1.34 /// Constructor.
|
91 kumpf 1.18 CIMValue(Sint16 x);
|
92 mike 1.11
|
93 kumpf 1.34 /// Constructor.
|
94 kumpf 1.18 CIMValue(Uint32 x);
|
95 mike 1.11
|
96 kumpf 1.34 /// Constructor.
|
97 kumpf 1.18 CIMValue(Sint32 x);
|
98 mike 1.11
|
99 kumpf 1.34 /// Constructor.
|
100 kumpf 1.18 CIMValue(Uint64 x);
|
101 mike 1.11
|
102 kumpf 1.34 /// Constructor.
|
103 kumpf 1.18 CIMValue(Sint64 x);
|
104 mike 1.11
|
105 kumpf 1.34 /// Constructor.
|
106 kumpf 1.18 CIMValue(Real32 x);
|
107 mike 1.11
|
108 kumpf 1.34 /// Constructor.
|
109 kumpf 1.18 CIMValue(Real64 x);
|
110 mike 1.11
|
111 kumpf 1.34 /// Constructor.
|
112 kumpf 1.18 CIMValue(const Char16& x);
|
113 mike 1.11
|
114 kumpf 1.34 /// Constructor.
|
115 kumpf 1.18 CIMValue(const String& x);
|
116 mike 1.11
|
117 kumpf 1.34 /// Constructor.
|
118 kumpf 1.18 CIMValue(const CIMDateTime& x);
|
119 mike 1.11
|
120 kumpf 1.34 /// Constructor.
|
121 kumpf 1.23 CIMValue(const CIMObjectPath& x);
|
122 mike 1.11
|
123 denise.eckstein 1.46 /** Constructor.
124 Note: Constructing a CIMValue with an uninitialized CIMObject is not
125 defined and results in a thrown UninitializedObjectException.
126 Note: The input CIMObject will be cloned before putting it into the
127 value of the constructed CIMValue. This is because CIMObjects use a
128 shared representation model, but we don't want CIMObjects inside a
129 CIMValue to be altered by other external changes.
130 */
|
131 dave.sudlik 1.41 CIMValue(const CIMObject& x);
132
133 /// Constructor.
|
134 a.dunfey 1.50 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
135 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
136 CIMValue(const CIMInstance& x);
137 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
138 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
139
140 /// Constructor.
|
141 kumpf 1.18 CIMValue(const Array<Boolean>& x);
|
142 mike 1.11
|
143 kumpf 1.34 /// Constructor.
|
144 kumpf 1.18 CIMValue(const Array<Uint8>& x);
|
145 mike 1.11
|
146 kumpf 1.34 /// Constructor.
|
147 kumpf 1.18 CIMValue(const Array<Sint8>& x);
|
148 mike 1.11
|
149 kumpf 1.34 /// Constructor.
|
150 kumpf 1.18 CIMValue(const Array<Uint16>& x);
|
151 mike 1.11
|
152 kumpf 1.34 /// Constructor.
|
153 kumpf 1.18 CIMValue(const Array<Sint16>& x);
|
154 mike 1.11
|
155 kumpf 1.34 /// Constructor.
|
156 kumpf 1.18 CIMValue(const Array<Uint32>& x);
|
157 mike 1.11
|
158 kumpf 1.34 /// Constructor.
|
159 kumpf 1.18 CIMValue(const Array<Sint32>& x);
|
160 mike 1.11
|
161 kumpf 1.34 /// Constructor.
|
162 kumpf 1.18 CIMValue(const Array<Uint64>& x);
|
163 mike 1.11
|
164 kumpf 1.34 /// Constructor.
|
165 kumpf 1.18 CIMValue(const Array<Sint64>& x);
|
166 mike 1.11
|
167 kumpf 1.34 /// Constructor.
|
168 kumpf 1.18 CIMValue(const Array<Real32>& x);
|
169 mike 1.11
|
170 kumpf 1.34 /// Constructor.
|
171 kumpf 1.18 CIMValue(const Array<Real64>& x);
|
172 mike 1.11
|
173 kumpf 1.34 /// Constructor.
|
174 kumpf 1.18 CIMValue(const Array<Char16>& x);
|
175 mike 1.11
|
176 kumpf 1.34 /// Constructor.
|
177 kumpf 1.18 CIMValue(const Array<String>& x);
|
178 mike 1.11
|
179 kumpf 1.34 /// Constructor.
|
180 kumpf 1.18 CIMValue(const Array<CIMDateTime>& x);
|
181 mike 1.11
|
182 kumpf 1.34 /// Constructor.
|
183 kumpf 1.23 CIMValue(const Array<CIMObjectPath>& x);
|
184 kumpf 1.14
|
185 denise.eckstein 1.46 /** Constructor.
186 Note: Constructing a CIMValue with an uninitialized CIMObject anywhere
187 in the input array is not defined and results in a thrown
188 UninitializedObjectException.
189 Note: Each CIMObject in the input Array will be cloned before putting
190 the Array into the value of the constructed CIMValue. This is because
191 CIMObjects use a shared representation model, but we don't want
192 CIMObjects inside a CIMValue to be altered by other external changes.
193 */
|
194 dave.sudlik 1.41 CIMValue(const Array<CIMObject>& x);
195
|
196 a.dunfey 1.50 /// Constructor.
197 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
198 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
199 CIMValue(const Array<CIMInstance>& x);
200 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
201 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
202
|
203 denise.eckstein 1.46 /** Constructor.
204 Note: If the input type is CIMObject, it/they will be cloned before
205 putting it into the value of the constructed CIMValue. This is because
206 CIMObjects use a shared representation model, but we don't want
207 CIMObjects inside a CIMValue to be altered by other external changes.
208 */
|
209 mike 1.11 CIMValue(const CIMValue& x);
210
|
211 kumpf 1.34 /// Destructor.
|
212 mike 1.11 ~CIMValue();
213
|
214 denise.eckstein 1.46 /** Operator =
215 Note: If the right hand side type is CIMObject, it/they will be cloned
216 before putting it into the value of the target CIMValue. This is because
217 CIMObjects use a shared representation model, but we don't want
218 CIMObjects inside a CIMValue to be altered by other external changes.
219 */
|
220 kumpf 1.18 CIMValue& operator=(const CIMValue& x);
|
221 mike 1.11
|
222 kumpf 1.34 /** Assigns one CIMValue object to another CIMValue object.
223 @param x - CIMValue object to be used for assignment.
|
224 dave.sudlik 1.45 Note: If the input type is CIMObject, it/they will be cloned before
225 putting it into the value of the target CIMValue. This is because
226 CIMObjects use a shared representation model, but we don't want
227 CIMObjects inside a CIMValue to be altered by other external changes.
|
228 karl 1.13 */
|
229 mike 1.11 void assign(const CIMValue& x);
230
|
231 kumpf 1.34 /** Clears the attributes and value of the CIMValue object.
|
232 karl 1.13 */
|
233 mike 1.11 void clear();
234
|
235 kumpf 1.34 /** Compares the types of two CIMValues. This
|
236 karl 1.13 compares the type field and the array indicators.
|
237 kumpf 1.18 @return true if both are of the same type and both are either arrays
|
238 kumpf 1.34 or not, false otherwise.
|
239 karl 1.13 <pre>
240 CIMValue a(Boolean(true);
241 CIMValue b = a;
242 if b.typeCompatible(a)
243 ...
244 </pre>
|
245 mike 1.11 */
|
246 kumpf 1.18 Boolean typeCompatible(const CIMValue& x) const;
|
247 mike 1.11
|
248 kumpf 1.34 /** Determines if the value is an array.
249 @return true if the value is an array, false otherwise.
|
250 mike 1.11 */
|
251 kumpf 1.18 Boolean isArray() const;
|
252 mike 1.11
|
253 kumpf 1.34 /** Determines whether the CIMvalue object is Null.
|
254 kumpf 1.18 Null is the specific condition where no value has
|
255 kumpf 1.34 yet been set. If a CIMValue object is Null, any get on that
256 object will create an exception.
257 @return true if the CIMValue object is Null, false otherwise.
|
258 mike 1.12 */
|
259 kumpf 1.18 Boolean isNull() const;
|
260 mike 1.12
|
261 kumpf 1.34 /** Gets the size of an Array CIMValue.
262 @return The number of entries in the array.
|
263 mike 1.11 */
264 Uint32 getArraySize() const;
265
|
266 kumpf 1.34 /** Gets the CIMType attribute for the CIMValue.
267 @return the CIMType value.
|
268 karl 1.13 */
|
269 kumpf 1.18 CIMType getType() const;
|
270 mike 1.11
|
271 kumpf 1.34 /** Sets the CIMValue a NULL, but with valid CIMType and array
272 characteristics.
273 @param type - CIMType for this CIMValue.
274 @param isArray - Boolean indicating whether this is an array CIMValue.
275 @param arraySize - Optional parameter indicating the array size.
|
276 karl 1.15 <pre>
|
277 kumpf 1.34 CIMValue value;
278 value.setNullValue(CIMType::BOOLEAN, false);
|
279 karl 1.15 </pre>
|
280 karl 1.13 */
|
281 mike 1.11 void setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0);
282
|
283 kumpf 1.34 /** Sets the type, Array attribute and puts the value provided
284 into the value of the target CIMValue.
|
285 karl 1.13 <pre>
286 CIMValue x;
287 x.set(Uint16(9));
288 </pre>
|
289 dave.sudlik 1.45 @exception UninitializedObjectException If the given type is CIMObject,
290 and the input CIMObject parameter is uninitialized or at least one entry
291 in the Array of CIMObjects is uninitialized.
292 Note: If the input type is CIMObject, it/they will be cloned before
293 putting it into the value of the target CIMValue. This is because
294 CIMObjects use a shared representation model, but we don't want
295 CIMObjects inside a CIMValue to be altered by other external changes.
|
296 karl 1.13 */
|
297 mike 1.11 void set(Boolean x);
298
|
299 kumpf 1.34 ///
|
300 mike 1.11 void set(Uint8 x);
|
301 karl 1.13 ///
|
302 mike 1.11 void set(Sint8 x);
|
303 karl 1.13 ///
|
304 mike 1.11 void set(Uint16 x);
|
305 karl 1.13 ///
|
306 mike 1.11 void set(Sint16 x);
|
307 karl 1.13 ///
|
308 mike 1.11 void set(Uint32 x);
|
309 karl 1.13 ///
|
310 mike 1.11 void set(Sint32 x);
|
311 karl 1.13 ///
|
312 mike 1.11 void set(Uint64 x);
|
313 karl 1.13 ///
|
314 mike 1.11 void set(Sint64 x);
|
315 karl 1.13 ///
|
316 mike 1.11 void set(Real32 x);
|
317 karl 1.13 ///
|
318 mike 1.11 void set(Real64 x);
|
319 karl 1.13 ///
|
320 mike 1.11 void set(const Char16& x);
|
321 karl 1.13 ///
|
322 mike 1.11 void set(const String& x);
|
323 karl 1.13 ///
|
324 mike 1.11 void set(const CIMDateTime& x);
|
325 karl 1.13 ///
|
326 kumpf 1.23 void set(const CIMObjectPath& x);
|
327 karl 1.13 ///
|
328 dave.sudlik 1.41 void set(const CIMObject& x);
329 ///
|
330 a.dunfey 1.50 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
331 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
332 void set(const CIMInstance& x);
333 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
334 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
335 ///
|
336 mike 1.11 void set(const Array<Boolean>& x);
|
337 karl 1.13 ///
|
338 mike 1.11 void set(const Array<Uint8>& x);
|
339 karl 1.13 ///
|
340 mike 1.11 void set(const Array<Sint8>& x);
|
341 karl 1.13 ///
|
342 mike 1.11 void set(const Array<Uint16>& x);
|
343 karl 1.13 ///
|
344 mike 1.11 void set(const Array<Sint16>& x);
|
345 karl 1.13 ///
|
346 mike 1.11 void set(const Array<Uint32>& x);
|
347 karl 1.13 ///
|
348 mike 1.11 void set(const Array<Sint32>& x);
|
349 karl 1.13 ///
|
350 mike 1.11 void set(const Array<Uint64>& x);
|
351 karl 1.13 ///
|
352 mike 1.11 void set(const Array<Sint64>& x);
|
353 karl 1.13 ///
|
354 mike 1.11 void set(const Array<Real32>& x);
|
355 karl 1.13 ///
|
356 mike 1.11 void set(const Array<Real64>& x);
|
357 karl 1.13 ///
|
358 mike 1.11 void set(const Array<Char16>& x);
|
359 karl 1.13 ///
|
360 mike 1.11 void set(const Array<String>& x);
|
361 karl 1.13 ///
|
362 mike 1.11 void set(const Array<CIMDateTime>& x);
|
363 kumpf 1.14 ///
|
364 kumpf 1.23 void set(const Array<CIMObjectPath>& x);
|
365 dave.sudlik 1.41 ///
366 void set(const Array<CIMObject>& x);
|
367 a.dunfey 1.50 ///
368 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
369 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
370 void set(const Array<CIMInstance>& x);
371 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
372 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
373 mike 1.11
|
374 kumpf 1.34 /** Gets the value of a CIMValue.
|
375 kumpf 1.31 Note: Before using get, the caller should use getType () and isNull ()
376 to ensure that the value is not null, and is of the correct type.
|
377 dave.sudlik 1.45
378 The behavior of get is undefined when the value is null.
|
379 kumpf 1.31
|
380 kumpf 1.34 @param Variable in which to return the value.
|
381 kumpf 1.31 @exception TypeMismatchException If the CIMValue type is not compatible
|
382 kumpf 1.34 with the type of the output parameter.
383 <pre>
384 Uint32 v;
385 CIMValue value(CIMValue::UINT32, UINT32(99));
386 value.get(v);
387 </pre>
|
388 kumpf 1.31
389 <pre>
|
390 kumpf 1.34 Uint32 v;
391 CIMValue value = property.getValue ();
392 if ((value.getType () == CIMTYPE_UINT32) && (!value.isNull ()))
393 value.get (v);
|
394 kumpf 1.31 </pre>
|
395 karl 1.13 */
|
396 mike 1.11 void get(Boolean& x) const;
|
397 karl 1.13 ///
|
398 mike 1.11 void get(Uint8& x) const;
|
399 karl 1.13 ///
|
400 mike 1.11 void get(Sint8& x) const;
|
401 karl 1.13 ///
|
402 mike 1.11 void get(Uint16& x) const;
|
403 karl 1.13 ///
|
404 mike 1.11 void get(Sint16& x) const;
|
405 karl 1.13 ///
|
406 mike 1.11 void get(Uint32& x) const;
|
407 karl 1.13 ///
|
408 mike 1.11 void get(Sint32& x) const;
|
409 karl 1.13 ///
|
410 mike 1.11 void get(Uint64& x) const;
|
411 karl 1.13 ///
|
412 mike 1.11 void get(Sint64& x) const;
|
413 karl 1.13 ///
|
414 mike 1.11 void get(Real32& x) const;
|
415 karl 1.13 ///
|
416 mike 1.11 void get(Real64& x) const;
|
417 karl 1.13 ///
|
418 mike 1.11 void get(Char16& x) const;
|
419 karl 1.13 ///
|
420 mike 1.11 void get(String& x) const;
|
421 karl 1.13 ///
|
422 mike 1.11 void get(CIMDateTime& x) const;
|
423 karl 1.13 ///
|
424 kumpf 1.23 void get(CIMObjectPath& x) const;
|
425 karl 1.13 ///
|
426 dave.sudlik 1.41 void get(CIMObject& x) const;
427 ///
|
428 a.dunfey 1.50 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
429 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
430 void get(CIMInstance& x) const;
431 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
432 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
433 ///
|
434 mike 1.11 void get(Array<Boolean>& x) const;
|
435 karl 1.13 ///
|
436 mike 1.11 void get(Array<Uint8>& x) const;
|
437 kumpf 1.44 ///
|
438 mike 1.11 void get(Array<Sint8>& x) const;
|
439 karl 1.13 ///
|
440 mike 1.11 void get(Array<Uint16>& x) const;
|
441 karl 1.13 ///
|
442 mike 1.11 void get(Array<Sint16>& x) const;
|
443 karl 1.13 ///
|
444 mike 1.11 void get(Array<Uint32>& x) const;
|
445 karl 1.13 ///
|
446 mike 1.11 void get(Array<Sint32>& x) const;
|
447 karl 1.13 ///
|
448 mike 1.11 void get(Array<Uint64>& x) const;
|
449 karl 1.13 ///
|
450 mike 1.11 void get(Array<Sint64>& x) const;
|
451 karl 1.13 ///
|
452 mike 1.11 void get(Array<Real32>& x) const;
|
453 karl 1.13 ///
|
454 mike 1.11 void get(Array<Real64>& x) const;
|
455 karl 1.13 ///
|
456 mike 1.11 void get(Array<Char16>& x) const;
|
457 karl 1.13 ///
|
458 mike 1.11 void get(Array<String>& x) const;
|
459 karl 1.13 ///
|
460 mike 1.11 void get(Array<CIMDateTime>& x) const;
|
461 kumpf 1.14 ///
|
462 kumpf 1.23 void get(Array<CIMObjectPath>& x) const;
|
463 dave.sudlik 1.41 ///
464 void get(Array<CIMObject>& x) const;
|
465 a.dunfey 1.50 ///
466 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES
467 #ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORT
468 void get(Array<CIMInstance>& x) const;
469 #endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORT
470 #endif // PEGASUS_USE_EXPERIMENTAL_INTERFACES
|
471 mike 1.11
|
472 kumpf 1.34 /** Compares with another CIMValue object for equality.
473 @param x - CIMValue to compare with.
474 @return true if they are identical in type, attribute and value,
475 false otherwise.
|
476 kumpf 1.27 */
477 Boolean equal(const CIMValue& x) const;
|
478 kumpf 1.20
|
479 kumpf 1.34 /** Converts the CIMvalue to a string. Should only be
480 used for output purposes. To get an actual String value, use
481 get(String &).
482 @return String output for CIMValue.
|
483 kumpf 1.18 <PRE>
484 String test;
485 CIMValue value(Boolean(true));
486 test = value.toString(); // puts "TRUE" into test
487 </PRE>
|
488 kumpf 1.44 */
|
489 mike 1.11 String toString() const;
490
|
491 david.dillard 1.43 #ifdef PEGASUS_USE_DEPRECATED_INTERFACES
|
492 kumpf 1.44 /**
493 <I><B>Deprecated Interface</B></I><BR>
494 Constructor. (Note: This constructor exists solely to support binary
495 compatibility with a previous definition of the Sint8 type.)
496 */
|
497 david.dillard 1.43 CIMValue(char x);
498
|
499 kumpf 1.44 /**
500 <I><B>Deprecated Interface</B></I><BR>
501 Constructor. (Note: This constructor exists solely to support binary
502 compatibility with a previous definition of the Sint8 type.)
503 */
|
504 david.dillard 1.43 CIMValue(const Array<char>& x);
505
|
506 kumpf 1.44 /**
507 <I><B>Deprecated Interface</B></I><BR>
508 Sets an Sint8 value. (Note: This method exists solely to support
509 binary compatibility with a previous definition of the Sint8 type.)
510 */
|
511 david.dillard 1.43 void set(char x);
512
|
513 kumpf 1.44 /**
514 <I><B>Deprecated Interface</B></I><BR>
515 Sets an Sint8 array value. (Note: This method exists solely to support
516 binary compatibility with a previous definition of the Sint8 type.)
517 */
|
518 david.dillard 1.43 void set(const Array<char>& x);
519
|
520 kumpf 1.44 /**
521 <I><B>Deprecated Interface</B></I><BR>
522 Gets an Sint8 value. (Note: This method exists solely to support
523 binary compatibility with a previous definition of the Sint8 type.)
524 */
|
525 david.dillard 1.43 void get(char& x) const;
526
|
527 kumpf 1.44 /**
528 <I><B>Deprecated Interface</B></I><BR>
529 Gets an Sint8 array value. (Note: This method exists solely to support
530 binary compatibility with a previous definition of the Sint8 type.)
531 */
|
532 david.dillard 1.43 void get(Array<char>& x) const;
533 #endif
534
|
535 mike 1.11 private:
536
|
537 mike 1.47 void _get(const String*& data, Uint32& size) const;
538
|
539 a.arora 1.37 CIMValueRep* _rep;
|
540 mike 1.11
541 friend class CIMMethodRep;
542 friend class CIMParameterRep;
543 friend class CIMPropertyRep;
544 friend class CIMQualifierRep;
545 friend class CIMQualifierDeclRep;
|
546 schuur 1.38 friend class BinaryStreamer;
|
547 mike 1.47 friend class XmlWriter;
|
548 mike 1.11 };
|
549 kumpf 1.18
|
550 karl 1.17 /** operator == compares two CIMValue objects for equality.
|
551 kumpf 1.34 @param x - First CIMValue to compare
552 @param y - Second CIMValue to compare
553 @return true if they are identical in type, attribute and value,
554 false otherwise.
|
555 karl 1.17 */
|
556 mike 1.11 PEGASUS_COMMON_LINKAGE Boolean operator==(const CIMValue& x, const CIMValue& y);
557
|
558 kumpf 1.34 /** operator != compares two CIMValue objects for inequality.
559 @param x - First CIMValue to compare
560 @param y - Second CIMValue to compare
561 @return true if they are NOT identical in type, attribute or value,
562 false otherwise.
|
563 karl 1.17 */
|
564 kumpf 1.18 PEGASUS_COMMON_LINKAGE Boolean operator!=(const CIMValue& x, const CIMValue& y);
|
565 mike 1.11
566 #define PEGASUS_ARRAY_T CIMValue
|
567 kumpf 1.24 # include <Pegasus/Common/ArrayInter.h>
|
568 mike 1.11 #undef PEGASUS_ARRAY_T
569
570 PEGASUS_NAMESPACE_END
571
|
572 mike 1.48 #ifdef PEGASUS_INTERNALONLY
573 #include <Pegasus/Common/CIMValueInline.h>
574 #endif
575
|
576 mike 1.11 #endif /* Pegasus_Value_h */
|