In file ../../src/Pegasus/Common/CIMValue.h:

class PEGASUS_COMMON_LINKAGE CIMValue

The CIMValue class represents a value of any of the CIM data types (see CIMType for a list of valid CIM data types).

Documentation

The CIMValue class represents a value of any of the CIM data types (see CIMType for a list of valid CIM data types). This class encapsulates a union which holds the current value. The class also has a type field indicating the type of that value.

Inheritance:


Public Methods

[more] CIMValue ()
Constructor - Creates an NULL CIMValue object set to null and with type CIMType:none and !arraytype
[more] CIMValue (CIMType type, Boolean isArray, Uint32 arraySize = 0)
Constructor - Creates a NULL CIMValue object with the type and array indicator set as specified.
[more] CIMValue (Boolean x)
Constructor
[more] CIMValue (Uint8 x)
Constructor
[more] CIMValue (Sint8 x)
Constructor
[more] CIMValue (Uint16 x)
Constructor
[more] CIMValue (Sint16 x)
Constructor
[more] CIMValue (Uint32 x)
Constructor
[more] CIMValue (Sint32 x)
Constructor
[more] CIMValue (Uint64 x)
Constructor
[more] CIMValue (Sint64 x)
Constructor
[more] CIMValue (Real32 x)
Constructor
[more] CIMValue (Real64 x)
Constructor
[more] CIMValue (const Char16& x)
Constructor
[more] CIMValue (const String& x)
Constructor
[more] CIMValue (const CIMDateTime& x)
Constructor
[more] CIMValue (const CIMObjectPath& x)
Constructor
[more] CIMValue (const CIMObject& x)
Constructor.
[more] CIMValue (const Array<Boolean>& x)
Constructor
[more] CIMValue (const Array<Uint8>& x)
Constructor
[more] CIMValue (const Array<Sint8>& x)
Constructor
[more] CIMValue (const Array<Uint16>& x)
Constructor
[more] CIMValue (const Array<Sint16>& x)
Constructor
[more] CIMValue (const Array<Uint32>& x)
Constructor
[more] CIMValue (const Array<Sint32>& x)
Constructor
[more] CIMValue (const Array<Uint64>& x)
Constructor
[more] CIMValue (const Array<Sint64>& x)
Constructor
[more] CIMValue (const Array<Real32>& x)
Constructor
[more] CIMValue (const Array<Real64>& x)
Constructor
[more] CIMValue (const Array<Char16>& x)
Constructor
[more] CIMValue (const Array<String>& x)
Constructor
[more] CIMValue (const Array<CIMDateTime>& x)
Constructor
[more] CIMValue (const Array<CIMObjectPath>& x)
Constructor
[more] CIMValue (const Array<CIMObject>& x)
Constructor.
[more] CIMValue (const CIMValue& x)
Constructor.
[more] ~CIMValue ()
Destructor
[more]CIMValue& operator= (const CIMValue& x)
Operator = Note: If the right hand side type is CIMObject, it/they will be cloned before putting it into the value of the target CIMValue.
[more]void assign (const CIMValue& x)
Assigns one CIMValue object to another CIMValue object.
[more]void clear ()
Clears the attributes and value of the CIMValue object
[more]Boolean typeCompatible (const CIMValue& x) const
Compares the types of two CIMValues.
[more]Boolean isArray () const
Determines if the value is an array.
[more]Boolean isNull () const
Determines whether the CIMvalue object is Null.
[more]Uint32 getArraySize () const
Gets the size of an Array CIMValue.
[more]CIMType getType () const
Gets the CIMType attribute for the CIMValue.
[more]void setNullValue (CIMType type, Boolean isArray, Uint32 arraySize = 0)
Sets the CIMValue a NULL, but with valid CIMType and array characteristics.
[more]void set (Boolean x)
Sets the type, Array attribute and puts the value provided into the value of the target CIMValue.
[more]void set (Uint8 x)
[more]void set (Sint8 x)
[more]void set (Uint16 x)
[more]void set (Sint16 x)
[more]void set (Uint32 x)
[more]void set (Sint32 x)
[more]void set (Uint64 x)
[more]void set (Sint64 x)
[more]void set (Real32 x)
[more]void set (Real64 x)
[more]void set (const Char16& x)
[more]void set (const String& x)
[more]void set (const CIMDateTime& x)
[more]void set (const CIMObjectPath& x)
[more]void set (const CIMObject& x)
[more]void set (const Array<Boolean>& x)
[more]void set (const Array<Uint8>& x)
[more]void set (const Array<Sint8>& x)
[more]void set (const Array<Uint16>& x)
[more]void set (const Array<Sint16>& x)
[more]void set (const Array<Uint32>& x)
[more]void set (const Array<Sint32>& x)
[more]void set (const Array<Uint64>& x)
[more]void set (const Array<Sint64>& x)
[more]void set (const Array<Real32>& x)
[more]void set (const Array<Real64>& x)
[more]void set (const Array<Char16>& x)
[more]void set (const Array<String>& x)
[more]void set (const Array<CIMDateTime>& x)
[more]void set (const Array<CIMObjectPath>& x)
[more]void set (const Array<CIMObject>& x)
[more]void get (Boolean& x) const
Gets the value of a CIMValue.
[more]void get (Uint8& x) const
[more]void get (Sint8& x) const
[more]void get (Uint16& x) const
[more]void get (Sint16& x) const
[more]void get (Uint32& x) const
[more]void get (Sint32& x) const
[more]void get (Uint64& x) const
[more]void get (Sint64& x) const
[more]void get (Real32& x) const
[more]void get (Real64& x) const
[more]void get (Char16& x) const
[more]void get (String& x) const
[more]void get (CIMDateTime& x) const
[more]void get (CIMObjectPath& x) const
[more]void get (CIMObject& x) const
[more]void get (Array<Boolean>& x) const
[more]void get (Array<Uint8>& x) const
[more]void get (Array<Sint8>& x) const
[more]void get (Array<Uint16>& x) const
[more]void get (Array<Sint16>& x) const
[more]void get (Array<Uint32>& x) const
[more]void get (Array<Sint32>& x) const
[more]void get (Array<Uint64>& x) const
[more]void get (Array<Sint64>& x) const
[more]void get (Array<Real32>& x) const
[more]void get (Array<Real64>& x) const
[more]void get (Array<Char16>& x) const
[more]void get (Array<String>& x) const
[more]void get (Array<CIMDateTime>& x) const
[more]void get (Array<CIMObjectPath>& x) const
[more]void get (Array<CIMObject>& x) const
[more]Boolean equal (const CIMValue& x) const
Compares with another CIMValue object for equality.
[more]String toString () const
Converts the CIMvalue to a string.
[more] CIMValue (char x)
Deprecated Interface
Constructor.
[more] CIMValue (const Array<char>& x)
Deprecated Interface
Constructor.
[more]void set (char x)
Deprecated Interface
Sets an Sint8 value.
[more]void set (const Array<char>& x)
Deprecated Interface
Sets an Sint8 array value.
[more]void get (char& x) const
Deprecated Interface
Gets an Sint8 value.
[more]void get (Array<char>& x) const
Deprecated Interface
Gets an Sint8 array value.

o CIMValue()
Constructor - Creates an NULL CIMValue object set to null and with type CIMType:none and !arraytype

o CIMValue(CIMType type, Boolean isArray, Uint32 arraySize = 0)
Constructor - Creates a NULL CIMValue object with the type and array indicator set as specified.
Throws:
TypeMismatchException If the given type is not valid for a CIMValue object.

o CIMValue(Boolean x)
Constructor

o CIMValue(Uint8 x)
Constructor

o CIMValue(Sint8 x)
Constructor

o CIMValue(Uint16 x)
Constructor

o CIMValue(Sint16 x)
Constructor

o CIMValue(Uint32 x)
Constructor

o CIMValue(Sint32 x)
Constructor

o CIMValue(Uint64 x)
Constructor

o CIMValue(Sint64 x)
Constructor

o CIMValue(Real32 x)
Constructor

o CIMValue(Real64 x)
Constructor

o CIMValue(const Char16& x)
Constructor

o CIMValue(const String& x)
Constructor

o CIMValue(const CIMDateTime& x)
Constructor

o CIMValue(const CIMObjectPath& x)
Constructor

o CIMValue(const CIMObject& x)
Constructor. Note: Constructing a CIMValue with an uninitialized CIMObject is not defined and results in a thrown UninitializedObjectException. Note: The input CIMObject will be cloned before putting it into the value of the constructed CIMValue. This is because CIMObjects use a shared representation model, but we don't want CIMObjects inside a CIMValue to be altered by other external changes.

o CIMValue(const Array<Boolean>& x)
Constructor

o CIMValue(const Array<Uint8>& x)
Constructor

o CIMValue(const Array<Sint8>& x)
Constructor

o CIMValue(const Array<Uint16>& x)
Constructor

o CIMValue(const Array<Sint16>& x)
Constructor

o CIMValue(const Array<Uint32>& x)
Constructor

o CIMValue(const Array<Sint32>& x)
Constructor

o CIMValue(const Array<Uint64>& x)
Constructor

o CIMValue(const Array<Sint64>& x)
Constructor

o CIMValue(const Array<Real32>& x)
Constructor

o CIMValue(const Array<Real64>& x)
Constructor

o CIMValue(const Array<Char16>& x)
Constructor

o CIMValue(const Array<String>& x)
Constructor

o CIMValue(const Array<CIMDateTime>& x)
Constructor

o CIMValue(const Array<CIMObjectPath>& x)
Constructor

o CIMValue(const Array<CIMObject>& x)
Constructor. Note: Constructing a CIMValue with an uninitialized CIMObject anywhere in the input array is not defined and results in a thrown UninitializedObjectException. Note: Each CIMObject in the input Array will be cloned before putting the Array into the value of the constructed CIMValue. This is because CIMObjects use a shared representation model, but we don't want CIMObjects inside a CIMValue to be altered by other external changes.

o CIMValue(const CIMValue& x)
Constructor. Note: If the input type is CIMObject, it/they will be cloned before putting it into the value of the constructed CIMValue. This is because CIMObjects use a shared representation model, but we don't want CIMObjects inside a CIMValue to be altered by other external changes.

o ~CIMValue()
Destructor

oCIMValue& operator=(const CIMValue& x)
Operator = Note: If the right hand side type is CIMObject, it/they will be cloned before putting it into the value of the target CIMValue. This is because CIMObjects use a shared representation model, but we don't want CIMObjects inside a CIMValue to be altered by other external changes.

ovoid assign(const CIMValue& x)
Assigns one CIMValue object to another CIMValue object.
Parameters:
x - - CIMValue object to be used for assignment. Note: If the input type is CIMObject, it/they will be cloned before putting it into the value of the target CIMValue. This is because CIMObjects use a shared representation model, but we don't want CIMObjects inside a CIMValue to be altered by other external changes.

ovoid clear()
Clears the attributes and value of the CIMValue object

oBoolean typeCompatible(const CIMValue& x) const
Compares the types of two CIMValues. This compares the type field and the array indicators.
Returns:
true if both are of the same type and both are either arrays or not, false otherwise.
CIMValue a(Boolean(true);
CIMValue b = a;
if b.typeCompatible(a)
...

oBoolean isArray() const
Determines if the value is an array.
Returns:
true if the value is an array, false otherwise.

oBoolean isNull() const
Determines whether the CIMvalue object is Null. Null is the specific condition where no value has yet been set. If a CIMValue object is Null, any get on that object will create an exception.
Returns:
true if the CIMValue object is Null, false otherwise.

oUint32 getArraySize() const
Gets the size of an Array CIMValue.
Returns:
The number of entries in the array.

oCIMType getType() const
Gets the CIMType attribute for the CIMValue.
Returns:
the CIMType value.

ovoid setNullValue(CIMType type, Boolean isArray, Uint32 arraySize = 0)
Sets the CIMValue a NULL, but with valid CIMType and array characteristics.
Parameters:
type - - CIMType for this CIMValue.
- isArray - Boolean indicating whether this is an array CIMValue.
arraySize - - Optional parameter indicating the array size.
CIMValue value;             
value.setNullValue(CIMType::BOOLEAN, false); 

ovoid set(Boolean x)
Sets the type, Array attribute and puts the value provided into the value of the target CIMValue.
            CIMValue x;
            x.set(Uint16(9));
        
Throws:
UninitializedObjectException If the given type is CIMObject, and the input CIMObject parameter is uninitialized or at least one entry in the Array of CIMObjects is uninitialized. Note: If the input type is CIMObject, it/they will be cloned before putting it into the value of the target CIMValue. This is because CIMObjects use a shared representation model, but we don't want CIMObjects inside a CIMValue to be altered by other external changes.

ovoid set(Uint8 x)

ovoid set(Sint8 x)

ovoid set(Uint16 x)

ovoid set(Sint16 x)

ovoid set(Uint32 x)

ovoid set(Sint32 x)

ovoid set(Uint64 x)

ovoid set(Sint64 x)

ovoid set(Real32 x)

ovoid set(Real64 x)

ovoid set(const Char16& x)

ovoid set(const String& x)

ovoid set(const CIMDateTime& x)

ovoid set(const CIMObjectPath& x)

ovoid set(const CIMObject& x)

ovoid set(const Array<Boolean>& x)

ovoid set(const Array<Uint8>& x)

ovoid set(const Array<Sint8>& x)

ovoid set(const Array<Uint16>& x)

ovoid set(const Array<Sint16>& x)

ovoid set(const Array<Uint32>& x)

ovoid set(const Array<Sint32>& x)

ovoid set(const Array<Uint64>& x)

ovoid set(const Array<Sint64>& x)

ovoid set(const Array<Real32>& x)

ovoid set(const Array<Real64>& x)

ovoid set(const Array<Char16>& x)

ovoid set(const Array<String>& x)

ovoid set(const Array<CIMDateTime>& x)

ovoid set(const Array<CIMObjectPath>& x)

ovoid set(const Array<CIMObject>& x)

ovoid get(Boolean& x) const
Gets the value of a CIMValue. Note: Before using get, the caller should use getType () and isNull () to ensure that the value is not null, and is of the correct type.

The behavior of get is undefined when the value is null.

Throws:
TypeMismatchException If the CIMValue type is not compatible with the type of the output parameter.
Uint32 v;
CIMValue value(CIMValue::UINT32, UINT32(99));
value.get(v);
Uint32 v;
CIMValue value = property.getValue ();
if ((value.getType () == CIMTYPE_UINT32) && (!value.isNull ()))
value.get (v);

Parameters:
Variable - in which to return the value.

ovoid get(Uint8& x) const

ovoid get(Sint8& x) const

ovoid get(Uint16& x) const

ovoid get(Sint16& x) const

ovoid get(Uint32& x) const

ovoid get(Sint32& x) const

ovoid get(Uint64& x) const

ovoid get(Sint64& x) const

ovoid get(Real32& x) const

ovoid get(Real64& x) const

ovoid get(Char16& x) const

ovoid get(String& x) const

ovoid get(CIMDateTime& x) const

ovoid get(CIMObjectPath& x) const

ovoid get(CIMObject& x) const

ovoid get(Array<Boolean>& x) const

ovoid get(Array<Uint8>& x) const

ovoid get(Array<Sint8>& x) const

ovoid get(Array<Uint16>& x) const

ovoid get(Array<Sint16>& x) const

ovoid get(Array<Uint32>& x) const

ovoid get(Array<Sint32>& x) const

ovoid get(Array<Uint64>& x) const

ovoid get(Array<Sint64>& x) const

ovoid get(Array<Real32>& x) const

ovoid get(Array<Real64>& x) const

ovoid get(Array<Char16>& x) const

ovoid get(Array<String>& x) const

ovoid get(Array<CIMDateTime>& x) const

ovoid get(Array<CIMObjectPath>& x) const

ovoid get(Array<CIMObject>& x) const

oBoolean equal(const CIMValue& x) const
Compares with another CIMValue object for equality.
Parameters:
x - - CIMValue to compare with.
Returns:
true if they are identical in type, attribute and value, false otherwise.

oString toString() const
Converts the CIMvalue to a string. Should only be used for output purposes. To get an actual String value, use get(String &).
Returns:
String output for CIMValue.
String test;
CIMValue value(Boolean(true));
test = value.toString();   puts "TRUE" into test

o CIMValue(char x)
Deprecated Interface
Constructor. (Note: This constructor exists solely to support binary compatibility with a previous definition of the Sint8 type.)

o CIMValue(const Array<char>& x)
Deprecated Interface
Constructor. (Note: This constructor exists solely to support binary compatibility with a previous definition of the Sint8 type.)

ovoid set(char x)
Deprecated Interface
Sets an Sint8 value. (Note: This method exists solely to support binary compatibility with a previous definition of the Sint8 type.)

ovoid set(const Array<char>& x)
Deprecated Interface
Sets an Sint8 array value. (Note: This method exists solely to support binary compatibility with a previous definition of the Sint8 type.)

ovoid get(char& x) const
Deprecated Interface
Gets an Sint8 value. (Note: This method exists solely to support binary compatibility with a previous definition of the Sint8 type.)

ovoid get(Array<char>& x) const
Deprecated Interface
Gets an Sint8 array value. (Note: This method exists solely to support binary compatibility with a previous definition of the Sint8 type.)


This class has no child classes.
Friends:
class CIMMethodRep
class CIMParameterRep
class CIMPropertyRep
class CIMQualifierRep
class CIMQualifierDeclRep
class BinaryStreamer

Alphabetic index HTML hierarchy of classes or Java