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

class PEGASUS_COMMON_LINKAGE CIMPropertyList

The CIMPropertyList class is used to represent a list of CIM properties in Pegasus.

Documentation

The CIMPropertyList class is used to represent a list of CIM properties in Pegasus.

This class comprises an array of propertyNames and a flag indicating whether the list is null. There are three possibilities which must be represented by the CIMPropertyList object because the CIMOperations that use CIMPropertyList define functional differences based on these three conditions. The property list is:

  • Non-empty (and non-null) - Operations where some properties are to be returned by the operation. The values in the list are valid property names.
  • Empty (and non-null)- Operations where NO properties are to be returned by the operation. The propertyList is empty but not Null.
  • Null - Operations where there is no propertyList filter. The list . is Null (a specific attributed of the list). There are, of course, no properties in the list.

To create a null property list use the default constructor or use the clear() method.

To create an empty property list use the constructor which takes a property array (pass an empty property array which produces an empty but not Null property list object).

Methods are provided for accessing elements of the the internal property list. There are none for modifying elements (the entire array must be formed and passed to the constructor or replaced by calling set()).


Inheritance:


Public Methods

[more] CIMPropertyList ()
Default constructor (sets isNull attribute of the list to true).
[more] CIMPropertyList (const CIMPropertyList& x)
Copies the property list to the value specified for the parameter x.
[more] CIMPropertyList (const Array<CIMName>& propertyNames)
Constructor that initializes propertyNames and creates an array with non-null values (sets isNull to false).
[more] ~CIMPropertyList ()
CIMPropertyList destructor
[more]void set (const Array<CIMName>& propertyNames)
Modifier for propertyNames (sets isNull to false) and sets the CIMName values in the input array into the propertyList object.
[more]CIMPropertyList& operator= (const CIMPropertyList& x)
Assigns the values of the CIMPropertyList instance to the CIMPropertyList.
[more]void clear ()
Clears the propertyNames array (sets isNull to true)
[more]Boolean isNull () const
Returns true if the property list is null.
[more]Uint32 size () const
Returns the number of propertyNames in the list.
[more]const CIMName& operator[] (Uint32 index) const
Return the property at the given index.
[more]Array<CIMName> getPropertyNameArray () const
Get an array of the property names.

o CIMPropertyList()
Default constructor (sets isNull attribute of the list to true). An array created with this constructor is Null.
            CIMPropertyList pl;
            assert(pl.isNull());
        

o CIMPropertyList(const CIMPropertyList& x)
Copies the property list to the value specified for the parameter x.
Parameters:
x - Specifies the name of the CIMPropertyList object to be copied.

o CIMPropertyList(const Array<CIMName>& propertyNames)
Constructor that initializes propertyNames and creates an array with non-null values (sets isNull to false).
Parameters:
- Array of CIMNames with which the propertyList object is initialized. For example:
Array<CIMName> n;
n.append("name");
n.append("type");
CIMPropertyList pl(n);

o ~CIMPropertyList()
CIMPropertyList destructor

ovoid set(const Array<CIMName>& propertyNames)
Modifier for propertyNames (sets isNull to false) and sets the CIMName values in the input array into the propertyList object.
Parameters:
- Array of CIMNames. For example:
Array<CIMName> n;
n.append("name");
n.append("type");
CIMPropertyList pl;
pl.set(n);
assert pl.size() = 2);

oCIMPropertyList& operator=(const CIMPropertyList& x)
Assigns the values of the CIMPropertyList instance to the CIMPropertyList.
Parameters:
x - Specifies the name of the CIMPropertyList instance whose values are to be assigned to the CIMPropertyList object.

ovoid clear()
Clears the propertyNames array (sets isNull to true)

oBoolean isNull() const
Returns true if the property list is null.
Returns:
A Boolean value of true if the property list is Null. It may be null because it was created without input or because it was set to Null with the clear() method. Otherwise, a value of false is returned. For example:
CIMPropertyList pl;
assert(pl.isNull());     Newly created object is Null
Therefore the a new instance of the CIMPropertyList object is created, pl, with null values.

oUint32 size() const
Returns the number of propertyNames in the list.
Returns:
Uint32 with count of number of properties in the list. Returns 0 if property list is Null but this is not sufficient to determine if it is Null. Use isNull to determine if it is Null.

oconst CIMName& operator[](Uint32 index) const
Return the property at the given index.
Throws:
out_of_index exception if the index is outside of the size of the propertyList. For example:
Array n;
n.append("name");
n.append("type");
CIMPropertyList pl(n);
assert(pl[0] == CIMName("name"));

Parameters:
index - Specifies the index value that contains the property list to retrieve.
Returns:
CIMName at the defined location.

oArray<CIMName> getPropertyNameArray() const
Get an array of the property names.
Returns:
Array of CIMName containing the property names from the propertyList object.
Array n = pl.getPropertyNameArray();


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java