cmpi
Public Member Functions | Private Member Functions | Friends | List of all members
CmpiArray Class Reference

#include <cmpi/CmpiArray.h>

Inheritance diagram for CmpiArray:
CmpiObject

Public Member Functions

 CmpiArray (CMPICount max, CMPIType type)
 
 CmpiArray ()
 
CMPICount size () const
 
CmpiArrayIdx operator[] (int idx) const
 
- Public Member Functions inherited from CmpiObject
CmpiBoolean isNull () const
 
CmpiString toString ()
 
CmpiBoolean isA (const char *typeName) const
 

Private Member Functions

void operator= (int x)
 
CMPIArraygetEnc () const
 
void * makeArray (CMPIBroker *mb, CMPICount max, CMPIType type)
 
 CmpiArray (CMPIArray *arr)
 

Friends

class CmpiArrayIdx
 
class CmpiData
 
class CmpiEnumeration
 

Additional Inherited Members

- Protected Member Functions inherited from CmpiObject
 CmpiObject ()
 
 CmpiObject (const void *enc)
 
CmpiString doToString (CMPIBroker *mb)
 
CmpiBoolean doIsA (CMPIBroker *mb, const char *typeName) const
 
- Protected Attributes inherited from CmpiObject
void * enc
 

Detailed Description

This class wraps a CMPIData value array. Index operations use the [] operator. Data extraction uses type conversion operators. Extraction operations can be appended to an array indexing operation like this:

CmpiString state;

CmpiArray states;

   states=ci.getProperty("States");

state=states[3];

Assignment statements use array indexing operations as well:

states[5]="offline";

  Type mismatches will be signalled by exceptions.

Constructor & Destructor Documentation

◆ CmpiArray() [1/3]

CmpiArray::CmpiArray ( CMPIArray arr)
private

References CmpiObject::enc.

◆ CmpiArray() [2/3]

CmpiArray::CmpiArray ( CMPICount  max,
CMPIType  type 
)

◆ CmpiArray() [3/3]

CmpiArray::CmpiArray ( )

Member Function Documentation

◆ getEnc()

CMPIArray * CmpiArray::getEnc ( ) const
private

Gets the encapsulated CMPIArray.

References CmpiObject::enc.

Referenced by CmpiData::CmpiData(), CmpiArrayIdx::getData(), CmpiArrayIdx::operator=(), and size().

◆ makeArray()

void * CmpiArray::makeArray ( CMPIBroker mb,
CMPICount  max,
CMPIType  type 
)
private

◆ operator=()

void CmpiArray::operator= ( int  x)
private

◆ operator[]()

CmpiArrayIdx CmpiArray::operator[] ( int  idx) const

References CmpiArrayIdx, and CmpiArrayIdx::idx.

◆ size()

CMPICount CmpiArray::size ( ) const

Friends And Related Function Documentation

◆ CmpiArrayIdx

friend class CmpiArrayIdx
friend

Referenced by operator[]().

◆ CmpiData

friend class CmpiData
friend

◆ CmpiEnumeration

friend class CmpiEnumeration
friend

The documentation for this class was generated from the following files: