CIMValue Class Reference

#include <CIMValue.h>

Public Member Functions

 CIMValue ()
 
 CIMValue (CIMType type, Boolean isArray, Uint32 arraySize=0)
 
 CIMValue (Boolean x)
 
 CIMValue (Uint8 x)
 
 CIMValue (Sint8 x)
 
 CIMValue (Uint16 x)
 
 CIMValue (Sint16 x)
 
 CIMValue (Uint32 x)
 
 CIMValue (Sint32 x)
 
 CIMValue (Uint64 x)
 
 CIMValue (Sint64 x)
 
 CIMValue (Real32 x)
 
 CIMValue (Real64 x)
 
 CIMValue (const Char16 &x)
 
 CIMValue (const String &x)
 
 CIMValue (const CIMDateTime &x)
 
 CIMValue (const CIMObjectPath &x)
 
 CIMValue (const CIMObject &x)
 
 CIMValue (const CIMInstance &x)
 
 CIMValue (const Array< Boolean > &x)
 
 CIMValue (const Array< Uint8 > &x)
 
 CIMValue (const Array< Sint8 > &x)
 
 CIMValue (const Array< Uint16 > &x)
 
 CIMValue (const Array< Sint16 > &x)
 
 CIMValue (const Array< Uint32 > &x)
 
 CIMValue (const Array< Sint32 > &x)
 
 CIMValue (const Array< Uint64 > &x)
 
 CIMValue (const Array< Sint64 > &x)
 
 CIMValue (const Array< Real32 > &x)
 
 CIMValue (const Array< Real64 > &x)
 
 CIMValue (const Array< Char16 > &x)
 
 CIMValue (const Array< String > &x)
 
 CIMValue (const Array< CIMDateTime > &x)
 
 CIMValue (const Array< CIMObjectPath > &x)
 
 CIMValue (const Array< CIMObject > &x)
 
 CIMValue (const Array< CIMInstance > &x)
 
 CIMValue (const CIMValue &x)
 
 ~CIMValue ()
 
CIMValueoperator= (const CIMValue &x)
 
void assign (const CIMValue &x)
 
void clear ()
 
Boolean typeCompatible (const CIMValue &x) const
 
Boolean isArray () const
 
Boolean isNull () const
 
Uint32 getArraySize () const
 
CIMType getType () const
 
void setNullValue (CIMType type, Boolean isArray, Uint32 arraySize=0)
 
void set (Boolean x)
 
void set (Uint8 x)
 
void set (Sint8 x)
 
void set (Uint16 x)
 
void set (Sint16 x)
 
void set (Uint32 x)
 
void set (Sint32 x)
 
void set (Uint64 x)
 
void set (Sint64 x)
 
void set (Real32 x)
 
void set (Real64 x)
 
void set (const Char16 &x)
 
void set (const String &x)
 
void set (const CIMDateTime &x)
 
void set (const CIMObjectPath &x)
 
void set (const CIMObject &x)
 
void set (const CIMInstance &x)
 
void set (const Array< Boolean > &x)
 
void set (const Array< Uint8 > &x)
 
void set (const Array< Sint8 > &x)
 
void set (const Array< Uint16 > &x)
 
void set (const Array< Sint16 > &x)
 
void set (const Array< Uint32 > &x)
 
void set (const Array< Sint32 > &x)
 
void set (const Array< Uint64 > &x)
 
void set (const Array< Sint64 > &x)
 
void set (const Array< Real32 > &x)
 
void set (const Array< Real64 > &x)
 
void set (const Array< Char16 > &x)
 
void set (const Array< String > &x)
 
void set (const Array< CIMDateTime > &x)
 
void set (const Array< CIMObjectPath > &x)
 
void set (const Array< CIMObject > &x)
 
void set (const Array< CIMInstance > &x)
 
void get (Boolean &x) const
 
void get (Uint8 &x) const
 
void get (Sint8 &x) const
 
void get (Uint16 &x) const
 
void get (Sint16 &x) const
 
void get (Uint32 &x) const
 
void get (Sint32 &x) const
 
void get (Uint64 &x) const
 
void get (Sint64 &x) const
 
void get (Real32 &x) const
 
void get (Real64 &x) const
 
void get (Char16 &x) const
 
void get (String &x) const
 
void get (CIMDateTime &x) const
 
void get (CIMObjectPath &x) const
 
void get (CIMObject &x) const
 
void get (CIMInstance &x) const
 
void get (Array< Boolean > &x) const
 
void get (Array< Uint8 > &x) const
 
void get (Array< Sint8 > &x) const
 
void get (Array< Uint16 > &x) const
 
void get (Array< Sint16 > &x) const
 
void get (Array< Uint32 > &x) const
 
void get (Array< Sint32 > &x) const
 
void get (Array< Uint64 > &x) const
 
void get (Array< Sint64 > &x) const
 
void get (Array< Real32 > &x) const
 
void get (Array< Real64 > &x) const
 
void get (Array< Char16 > &x) const
 
void get (Array< String > &x) const
 
void get (Array< CIMDateTime > &x) const
 
void get (Array< CIMObjectPath > &x) const
 
void get (Array< CIMObject > &x) const
 
void get (Array< CIMInstance > &x) const
 
Boolean equal (const CIMValue &x) const
 
String toString () const
 

Detailed Description

The CIMValue class represents a value of any of the CIM data types. This class encapsulates a union which holds value of any CIMType. A type field indicates the type of the value.

WARNING: The returned value of CIMValue get(returnValue) is never nodified when a CIMValue is null (i.e. isNull() == true). An isNull() test should be executed before executing any CIMValue get(...) if there is any question of a possible null value and you are not sure of the value in the returned variable.

Constructor & Destructor Documentation

◆ CIMValue() [1/37]

CIMValue::CIMValue ( )

Constructs a null CIMValue with type Boolean and isArray=false.

◆ CIMValue() [2/37]

CIMValue::CIMValue ( CIMType  type,
Boolean  isArray,
Uint32  arraySize = 0 
)

Constructs a null CIMValue object with the specified type and array indicator.

Parameters
typeThe CIMType of the value
isArrayA Boolean indicating whether the value is of array type
arraySizeAn integer specifying the size of the array, if the CIMValue is for an array of a fixed size. This value is ignored if the isArray argument is false.

◆ CIMValue() [3/37]

CIMValue::CIMValue ( Boolean  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Boolean value to assign

◆ CIMValue() [4/37]

CIMValue::CIMValue ( Uint8  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint8 value to assign

◆ CIMValue() [5/37]

CIMValue::CIMValue ( Sint8  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint8 value to assign

◆ CIMValue() [6/37]

CIMValue::CIMValue ( Uint16  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint16 value to assign

◆ CIMValue() [7/37]

CIMValue::CIMValue ( Sint16  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint16 value to assign

◆ CIMValue() [8/37]

CIMValue::CIMValue ( Uint32  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint32 value to assign

◆ CIMValue() [9/37]

CIMValue::CIMValue ( Sint32  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint32 value to assign

◆ CIMValue() [10/37]

CIMValue::CIMValue ( Uint64  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint64 value to assign

◆ CIMValue() [11/37]

CIMValue::CIMValue ( Sint64  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint64 value to assign

◆ CIMValue() [12/37]

CIMValue::CIMValue ( Real32  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Real32 value to assign

◆ CIMValue() [13/37]

CIMValue::CIMValue ( Real64  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Real64 value to assign

◆ CIMValue() [14/37]

CIMValue::CIMValue ( const Char16 x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Char16 value to assign

◆ CIMValue() [15/37]

CIMValue::CIMValue ( const String x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe String value to assign

◆ CIMValue() [16/37]

CIMValue::CIMValue ( const CIMDateTime x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe CIMDateTime value to assign

◆ CIMValue() [17/37]

CIMValue::CIMValue ( const CIMObjectPath x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe CIMObjectPath value to assign

◆ CIMValue() [18/37]

CIMValue::CIMValue ( const CIMObject x)

Constructs a CIMValue with the specified value and inferred type. Note: The CIMObject argument is cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMObject value to assign
Exceptions
UninitializedObjectExceptionIf the CIMObject is uninitialized.

◆ CIMValue() [19/37]

CIMValue::CIMValue ( const CIMInstance x)

Constructs a CIMValue with the specified value and inferred type. Note: The CIMInstance argument is cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMInstance value to assign
Exceptions
UninitializedObjectExceptionIf the CIMInstance is uninitialized.

◆ CIMValue() [20/37]

CIMValue::CIMValue ( const Array< Boolean > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Boolean Array value to assign

◆ CIMValue() [21/37]

CIMValue::CIMValue ( const Array< Uint8 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint8 Array value to assign

◆ CIMValue() [22/37]

CIMValue::CIMValue ( const Array< Sint8 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint8 Array value to assign

◆ CIMValue() [23/37]

CIMValue::CIMValue ( const Array< Uint16 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint16 Array value to assign

◆ CIMValue() [24/37]

CIMValue::CIMValue ( const Array< Sint16 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint16 Array value to assign

◆ CIMValue() [25/37]

CIMValue::CIMValue ( const Array< Uint32 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint32 Array value to assign

◆ CIMValue() [26/37]

CIMValue::CIMValue ( const Array< Sint32 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint32 Array value to assign

◆ CIMValue() [27/37]

CIMValue::CIMValue ( const Array< Uint64 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Uint64 Array value to assign

◆ CIMValue() [28/37]

CIMValue::CIMValue ( const Array< Sint64 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Sint64 Array value to assign

◆ CIMValue() [29/37]

CIMValue::CIMValue ( const Array< Real32 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Real32 Array value to assign

◆ CIMValue() [30/37]

CIMValue::CIMValue ( const Array< Real64 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Real64 Array value to assign

◆ CIMValue() [31/37]

CIMValue::CIMValue ( const Array< Char16 > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe Char16 Array value to assign

◆ CIMValue() [32/37]

CIMValue::CIMValue ( const Array< String > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe String Array value to assign

◆ CIMValue() [33/37]

CIMValue::CIMValue ( const Array< CIMDateTime > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe CIMDateTime Array value to assign

◆ CIMValue() [34/37]

CIMValue::CIMValue ( const Array< CIMObjectPath > &  x)

Constructs a CIMValue with the specified value and inferred type.

Parameters
xThe CIMObjectPath Array value to assign

◆ CIMValue() [35/37]

CIMValue::CIMValue ( const Array< CIMObject > &  x)

Constructs a CIMValue with the specified value and inferred type. Note: The CIMObjects in the Array argument are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMObject Array value to assign
Exceptions
UninitializedObjectExceptionIf any of the CIMObjects in the Array are uninitialized.

◆ CIMValue() [36/37]

CIMValue::CIMValue ( const Array< CIMInstance > &  x)

Constructs a CIMValue with the specified value and inferred type. Note: The CIMInstances in the Array argument are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMInstance Array value to assign
Exceptions
UninitializedObjectExceptionIf any of the CIMInstances in the Array are uninitialized.

◆ CIMValue() [37/37]

CIMValue::CIMValue ( const CIMValue x)

Constructs a CIMValue by copying another CIMValue object. Note: If the specified CIMValue contains CIMObject or CIMInstance objects, they are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMValue object to copy

◆ ~CIMValue()

CIMValue::~CIMValue ( )

Destructs a CIMValue object.

Member Function Documentation

◆ assign()

void CIMValue::assign ( const CIMValue x)

Assigns the value from a specified CIMValue object. Note: If the specified CIMValue contains CIMObject or CIMInstance objects, they are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMValue object to copy

◆ clear()

void CIMValue::clear ( )

Resets to a null value with type Boolean and isArray=false.

◆ equal()

Boolean CIMValue::equal ( const CIMValue x) const

Compares with another CIMValue object for equality.

Parameters
xThe CIMValue with which to compare
Returns
A Boolean indicating whether they are identical in type, array attributes, and value.

◆ get() [1/34]

void CIMValue::get ( Boolean &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

    // get with complete checking on type and nullness
    Boolean v;
    CIMValue value = property.getValue();
    if ((value.getType() == CIMTYPE_BOOLEAN) && (!value.isNull()))
        value.get(v);
    or
    // Set the value from property into v if the value is
    // of Boolean type and !isNull(). If type incorrect, generates
    // an exception.  If CIMValue is null, leaves v false. Else
    // sets Boolean value from property into v.
    Boolean v = false;
    property.getValue().get(v);
Parameters
xOutput Boolean into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [2/34]

void CIMValue::get ( Uint8 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Uint8 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [3/34]

void CIMValue::get ( Sint8 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint8 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [4/34]

void CIMValue::get ( Uint16 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Uint16 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [5/34]

void CIMValue::get ( Sint16 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint16 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [6/34]

void CIMValue::get ( Uint32 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

    Uint32 v;
    CIMValue value = property.getValue();
    if ((value.getType() == CIMTYPE_SINT32) && (!value.isNull()))
        value.get(v);
Parameters
xOutput Uint32 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [7/34]

void CIMValue::get ( Sint32 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint32 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [8/34]

void CIMValue::get ( Uint64 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Uint64 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [9/34]

void CIMValue::get ( Sint64 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint64 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [10/34]

void CIMValue::get ( Real32 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Real32 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [11/34]

void CIMValue::get ( Real64 &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Real64 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [12/34]

void CIMValue::get ( Char16 x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Char16 into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [13/34]

void CIMValue::get ( String x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput String into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [14/34]

void CIMValue::get ( CIMDateTime x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMDateTime into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [15/34]

void CIMValue::get ( CIMObjectPath x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).).

Parameters
xOutput CIMObjectPath into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [16/34]

void CIMValue::get ( CIMObject x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMObject into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [17/34]

void CIMValue::get ( CIMInstance x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMInstance into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [18/34]

void CIMValue::get ( Array< Boolean > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Boolean Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [19/34]

void CIMValue::get ( Array< Uint8 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Uint8 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [20/34]

void CIMValue::get ( Array< Sint8 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint8 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [21/34]

void CIMValue::get ( Array< Uint16 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).).

Parameters
xOutput Uint16 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [22/34]

void CIMValue::get ( Array< Sint16 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint16 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [23/34]

void CIMValue::get ( Array< Uint32 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Uint32 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [24/34]

void CIMValue::get ( Array< Sint32 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint32 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [25/34]

void CIMValue::get ( Array< Uint64 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Uint64 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [26/34]

void CIMValue::get ( Array< Sint64 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Sint64 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [27/34]

void CIMValue::get ( Array< Real32 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Real32 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [28/34]

void CIMValue::get ( Array< Real64 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Real64 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [29/34]

void CIMValue::get ( Array< Char16 > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput Char16 Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [30/34]

void CIMValue::get ( Array< String > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput String Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [31/34]

void CIMValue::get ( Array< CIMDateTime > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMDateTime Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [32/34]

void CIMValue::get ( Array< CIMObjectPath > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMObjectPath Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [33/34]

void CIMValue::get ( Array< CIMObject > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMObject Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ get() [34/34]

void CIMValue::get ( Array< CIMInstance > &  x) const

Gets the value of the CIMValue. The caller should first verify that the value is not null and may verify type to avoid the possibility of the TypeMismatchException. The output parameter x is NOT updated if the value is null (isNull() == true).

Parameters
xOutput CIMInstance Array into which the value is stored if CIMValue state is not null.
Exceptions
TypeMismatchExceptionIf the value type does not match the output parameter.

◆ getArraySize()

Uint32 CIMValue::getArraySize ( ) const

Gets the fixed array size of a CIMValue. This value is undefined for non-array values. A value of 0 is given for variable size arrays. Result is undetermined if CIMValue is null.

Returns
An integer indicating the array size.

◆ getType()

CIMType CIMValue::getType ( ) const

Gets the value type.

Returns
A CIMType indicating the type of the value.

◆ isArray()

Boolean CIMValue::isArray ( ) const

Indicates whether the value is an array.

Returns
A Boolean indicating whether the value is an array.

◆ isNull()

Boolean CIMValue::isNull ( ) const

Indicates whether the value is null. A null CIMValue has a type, but no value can be retrieved from it.

Returns
A Boolean indicating whether the value is null.

◆ operator=()

CIMValue& CIMValue::operator= ( const CIMValue x)

Assigns the value from a specified CIMValue object. Note: If the specified CIMValue contains CIMObject or CIMInstance objects, they are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMValue object to copy
Returns
A reference to this CIMValue object with the new assignment

◆ set() [1/34]

void CIMValue::set ( Boolean  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Boolean value to assign

◆ set() [2/34]

void CIMValue::set ( Uint8  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint8 value to assign

◆ set() [3/34]

void CIMValue::set ( Sint8  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint8 value to assign

◆ set() [4/34]

void CIMValue::set ( Uint16  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint16 value to assign

◆ set() [5/34]

void CIMValue::set ( Sint16  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint16 value to assign

◆ set() [6/34]

void CIMValue::set ( Uint32  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint32 value to assign

◆ set() [7/34]

void CIMValue::set ( Sint32  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint32 value to assign

◆ set() [8/34]

void CIMValue::set ( Uint64  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint64 value to assign

◆ set() [9/34]

void CIMValue::set ( Sint64  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint64 value to assign

◆ set() [10/34]

void CIMValue::set ( Real32  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Real32 value to assign

◆ set() [11/34]

void CIMValue::set ( Real64  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Real64 value to assign

◆ set() [12/34]

void CIMValue::set ( const Char16 x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Char16 value to assign

◆ set() [13/34]

void CIMValue::set ( const String x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe String value to assign

◆ set() [14/34]

void CIMValue::set ( const CIMDateTime x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe CIMDateTime value to assign

◆ set() [15/34]

void CIMValue::set ( const CIMObjectPath x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe CIMObjectPath value to assign

◆ set() [16/34]

void CIMValue::set ( const CIMObject x)

Sets the CIMValue to the specified value and inferred type. Note: The CIMObject argument is cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMObject value to assign
Exceptions
UninitializedObjectExceptionIf the CIMObject is uninitialized.

◆ set() [17/34]

void CIMValue::set ( const CIMInstance x)

Sets the CIMValue to the specified value and inferred type. Note: The CIMInstance argument is cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMInstance value to assign
Exceptions
UninitializedObjectExceptionIf the CIMInstance is uninitialized.

◆ set() [18/34]

void CIMValue::set ( const Array< Boolean > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Boolean Array value to assign

◆ set() [19/34]

void CIMValue::set ( const Array< Uint8 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint8 Array value to assign

◆ set() [20/34]

void CIMValue::set ( const Array< Sint8 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint8 Array value to assign

◆ set() [21/34]

void CIMValue::set ( const Array< Uint16 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint16 Array value to assign

◆ set() [22/34]

void CIMValue::set ( const Array< Sint16 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint16 Array value to assign

◆ set() [23/34]

void CIMValue::set ( const Array< Uint32 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint32 Array value to assign

◆ set() [24/34]

void CIMValue::set ( const Array< Sint32 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint32 Array value to assign

◆ set() [25/34]

void CIMValue::set ( const Array< Uint64 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Uint64 Array value to assign

◆ set() [26/34]

void CIMValue::set ( const Array< Sint64 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Sint64 Array value to assign

◆ set() [27/34]

void CIMValue::set ( const Array< Real32 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Real32 Array value to assign

◆ set() [28/34]

void CIMValue::set ( const Array< Real64 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Real64 Array value to assign

◆ set() [29/34]

void CIMValue::set ( const Array< Char16 > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe Char16 Array value to assign

◆ set() [30/34]

void CIMValue::set ( const Array< String > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe String Array value to assign

◆ set() [31/34]

void CIMValue::set ( const Array< CIMDateTime > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe CIMDateTime Array value to assign

◆ set() [32/34]

void CIMValue::set ( const Array< CIMObjectPath > &  x)

Sets the CIMValue to the specified value and inferred type.

Parameters
xThe CIMObjectPath Array value to assign

◆ set() [33/34]

void CIMValue::set ( const Array< CIMObject > &  x)

Sets the CIMValue to the specified value and inferred type. Note: The CIMObjects in the Array argument are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMObject Array value to assign
Exceptions
UninitializedObjectExceptionIf any of the CIMObjects in the Array are uninitialized.

◆ set() [34/34]

void CIMValue::set ( const Array< CIMInstance > &  x)

Sets the CIMValue to the specified value and inferred type. Note: The CIMInstances in the Array argument are cloned to prevent subsequent modification through the shared representation model.

Parameters
xThe CIMInstance Array value to assign
Exceptions
UninitializedObjectExceptionIf any of the CIMInstances in the Array are uninitialized.

◆ setNullValue()

void CIMValue::setNullValue ( CIMType  type,
Boolean  isArray,
Uint32  arraySize = 0 
)

Sets the value to null with the specified type and array indicator.

Parameters
typeThe CIMType of the value
isArrayA Boolean indicating whether the value is of array type
arraySizeAn integer specifying the size of the array, if the CIMValue is for an array of a fixed size. This value is ignored if the isArray argument is false.

◆ toString()

String CIMValue::toString ( ) const

Converts a CIMValue to a String. This method should only be used for diagnostic output purposes. To get an actual String value, use get(String &).

Returns
A String representation of the value.

◆ typeCompatible()

Boolean CIMValue::typeCompatible ( const CIMValue x) const

Compares the type and isArray attributes with a specified CIMValue.

Parameters
xThe CIMValue object with which to compare
Returns
A Boolean indicating whether the CIMValue objects have the same type and isArray attribute value.

The documentation for this class was generated from the following file:
  • /root/rpmbuild/BUILD/pegasus/src/Pegasus/Common/CIMValue.h