CIMPropertyList Class Reference
#include <CIMPropertyList.h>
Public Member Functions
CIMPropertyList () CIMPropertyList (const CIMPropertyList &x) CIMPropertyList (const Array< CIMName > &propertyNames) ~CIMPropertyList () void set (const Array< CIMName > &propertyNames) CIMPropertyList & operator= (const CIMPropertyList &x) void clear () Boolean isNull () const Uint32 size () const const CIMName & operator[] (Uint32 index) const Array< CIMName > getPropertyNameArray () const Uint32 getCIMNameTag (Uint32 index) const void append (Array< String > &propertyListArray) void appendCIMNameTag (Uint32 nameTag) Boolean contains (const CIMName &name) const Boolean useThisProperty (const CIMName &name) const String toString () const Detailed Description
The CIMPropertyList class represents a propertyList parameter in a CIM operation request, as defined in the DMTF Specification for CIM Operations over HTTP.
This class consists of an array of property names and a flag indicating whether the list is null. A null property list indicates that no filtering is performed on the basis of this parameter. A non-null property list indicates that any property not specified in the list is to be filtered from the CIM operation response. (An empty property list implies that all properties should be filtered from the response.)
A null property list is created by using the default constructor or the clear method. An empty property list is created by setting the value to an empty Array.
Constructor & Destructor Documentation
◆ CIMPropertyList() [1/3]
CIMPropertyList::CIMPropertyList ( ) ◆ CIMPropertyList() [2/3]
CIMPropertyList::CIMPropertyList ( const CIMPropertyList & x ) Constructs a CIMPropertyList object from the value of a specified CIMPropertyList object.
- Parameters
x The CIMPropertyList object from which to construct a new CIMPropertyList object. ◆ CIMPropertyList() [3/3]
Constructs a non-null property list with the specified property names.
Example:
Array<CIMName> n; n.append("name"); n.append("type"); CIMPropertyList pl(n);
- Parameters
propertyNames An Array of CIMNames specifying the property names in the list. UninitializedObjectException if any CIMName in the array argument is NULL ◆ ~CIMPropertyList()
CIMPropertyList::~CIMPropertyList ( ) Destructs the CIMPropertyList object.
Member Function Documentation
◆ clear()
void CIMPropertyList::clear ( ) Sets the property list to a null value.
◆ contains()
Boolean CIMPropertyList::contains ( const CIMName & name ) const Determine if the propertylist contains the property name defined in the input argument. This does not cover the concept of NULL propertylist. A NULL or empty list will return false.
- Parameters
name CIMName containing the property name to be matched against the propertylist
- Returns
- True if the argument name is in the list. Otherwise returns false.
- Version
- 2.14
◆ getPropertyNameArray()
◆ isNull()
Boolean CIMPropertyList::isNull ( ) const Determines whether the property list is null.
- Returns
- True if the property list is null, false otherwise.
◆ operator=()
CIMPropertyList& CIMPropertyList::operator= ( const CIMPropertyList & x ) Assigns the value of the specified CIMPropertyList object to this object.
- Parameters
x The CIMPropertyList object from which to assign this CIMPropertyList object.
- Returns
- A reference to this CIMPropertyList object.
◆ operator[]()
const CIMName& CIMPropertyList::operator[] ( Uint32 index ) const Gets the property name at a specified index.
Example:
Array<CIMName> n; n.append("name"); n.append("type"); CIMPropertyList pl(n); assert(pl[0] == CIMName("name"));
- Parameters
index The index of the property name to be retrieved.
- Returns
- A CIMName containing the property name at the specified index.
- Exceptions
IndexOutOfBoundsException If the index is outside the range of property names in the property list or if the property list is null. ◆ set()
Sets the property list with the specified property names. The resulting property list is non-null.
Example:
Array<CIMName> n; n.append("name"); n.append("type"); CIMPropertyList pl; pl.set(n); assert(pl.size() = 2);
- Parameters
propertyNames An Array of CIMNames specifying the property names in the list. UninitializedObjectException if any CIMName in the array argument is NULL ◆ size()
Uint32 CIMPropertyList::size ( ) const Gets the number of property names in the property list.
- Returns
- An integer count of the property names in the CIMPropertyList. A value of 0 is returned if the list is null or empty.
◆ toString()
String CIMPropertyList::toString ( ) const ◆ useThisProperty()
Boolean CIMPropertyList::useThisProperty ( const CIMName & name ) const Convience function to determine if the propertyList is either NULL or the property is in the list. This can be used as a single method by a provider to determine if a property is to be included in the response
- Parameters
name CIMName containing the property name to be matched against the propertylist
- Returns
- True if the argument name is in the list or the list is null. Otherwise returns false.
- Version
- 2.14
Example:
if (p.useThisProperty("prop1") instance.addProperty("prop1",...); if (p.useThisProperty("prop2") instance.addProperty("prop2",,,,);
The documentation for this class was generated from the following file:
- /home/loongson/rpmbuild/BUILD/pegasus/src/Pegasus/Common/CIMPropertyList.h