CMPI 2.1.0 API
|
Function table of CMPIArray encapsulated data type object. More...
#include <cmpift.h>
Data Fields | |
CMPIVersion | ftVersion |
CMPI version supported by the MB for this function table. More... | |
CMPIStatus(* | release )(CMPIArray *ar) |
Release a CMPIArray object. More... | |
CMPIArray *(* | clone )(const CMPIArray *ar, CMPIStatus *rc) |
Create an independent copy of a CMPIArray object. More... | |
CMPICount(* | getSize )(const CMPIArray *ar, CMPIStatus *rc) |
Get the number of array elements in a CMPIArray object. More... | |
CMPIType(* | getSimpleType )(const CMPIArray *ar, CMPIStatus *rc) |
Get the type of the array elements in a CMPIArray object. More... | |
CMPIData(* | getElementAt )(const CMPIArray *ar, CMPICount index, CMPIStatus *rc) |
Get the value of an array element in a CMPIArray object by index. More... | |
CMPIStatus(* | setElementAt )(const CMPIArray *ar, CMPICount index, const CMPIValue *value, CMPIType type) |
Set the value of an existing array element in a CMPIArray object by index. More... | |
Function table of CMPIArray encapsulated data type object.
CMPIVersion CMPIArrayFT::ftVersion |
CMPI version supported by the MB for this function table.
Any earlier CMPI versions are implicitly also supported.
See CMPIVersion<NNN> for valid CMPI version numbers.
CMPIStatus(* CMPIArrayFT::release)(CMPIArray *ar) |
Release a CMPIArray object.
CMPIArrayFT.release() releases a CMPIArray object. This indicates to the MB that the object (including any objects it contains) will no longer be used by the MI. The MB may free (=reclaim) the memory associated with the object during the call to this function, or later during some garbage collection cycle (see Subclause 4.1.7 of the CMPI Standard).
ar | Points to the CMPIArray object that is to be released. That object shall have been created using CMPIArrayFT.clone(). |
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ar
handle is invalid.CMPIArray*(* CMPIArrayFT::clone)(const CMPIArray *ar, CMPIStatus *rc) |
Create an independent copy of a CMPIArray object.
CMPIArrayFT.clone() creates an independent copy of a CMPIArray object.
ar | Points to the CMPIArray object that is to be copied. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a pointer to the copied CMPIArray object will be returned.
The returned CMPIArray object shall be explicitly released by the MI using CMPIArrayFT.release().
If not successful, NULL will be returned.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ar
handle is invalid.CMPICount(* CMPIArrayFT::getSize)(const CMPIArray *ar, CMPIStatus *rc) |
Get the number of array elements in a CMPIArray object.
CMPIArrayFT.getSize() gets the number of array elements in a CMPIArray object.
ar | Points to the CMPIArray object for this function. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a CMPICount value indicating the number of array elements will be returned.
If not successful, 0 will be returned.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ar
handle is invalid.CMPIType(* CMPIArrayFT::getSimpleType)(const CMPIArray *ar, CMPIStatus *rc) |
Get the type of the array elements in a CMPIArray object.
CMPIArrayFT.getSimpleType() gets the type of the array elements in a CMPIArray object.
ar | Points to the CMPIArray object for this function. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a CMPIType value indicating the type of the CMPIArray elements will be returned. The returned value indicates the type of single array elements; for example, the value returned for a CMPIArray object that contains CMPIString objects, will be CMPI_string, and not CMPI_stringA.
If not successful, CMPI_null will be returned.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ar
handle is invalid.CMPIData(* CMPIArrayFT::getElementAt)(const CMPIArray *ar, CMPICount index, CMPIStatus *rc) |
Get the value of an array element in a CMPIArray object by index.
CMPIArrayFT.getElementAt() gets the value of an array element of an array element in a CMPIArray object by index.
ar | Points to the CMPIArray object for this function. | |
index | Zero-based position of the array element in the CMPIArray. The position shall be equal to or greater than 0 and less than the size of the array. | |
[out] | rc | If not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status. |
If successful, a CMPIData structure containing the specified array element will be returned.
If not successful, CMPIData.state will be undefined.
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ar
handle is invalid. CMPI_RC_ERR_NO_SUCH_PROPERTY
- index
value out of range.CMPIStatus(* CMPIArrayFT::setElementAt)(const CMPIArray *ar, CMPICount index, const CMPIValue *value, CMPIType type) |
Set the value of an existing array element in a CMPIArray object by index.
CMPIArrayFT.setElementAt() sets the value of an existing array element in a CMPIArray object by index.
ar | Points to the CMPIArray object for this function. |
index | Zero-based position of the existing element in the CMPIArray object. The position shall be equal to or greater than 0 and less than the size of the array. |
value | Points to a CMPIValue structure containing the non-NULL value to be assigned to the element, or is NULL to specify that the element will be set to NULL. |
type | Either the simple base type of the array or CMPI_null. The use of CMPI_null for If the value of |
CMPIStatus structure containing the function return status.
If not successful, the array element’s state shall be set to CMPI_nullValue, if possible.
This behavior has been deprecated in CMPI 2.1, and callers should now assume that it is undefined whether the array element's state has changed in case of error. (Deprecated)
CMPI_RC_OK
- Function successful. CMPI_RC_ERR_INVALID_HANDLE
- The ar
handle is invalid. CMPI_RC_ERR_NO_SUCH_PROPERTY
- index
value out of range. CMPI_RC_ERR_TYPE_MISMATCH
- type
does not correspond to the simple base type of ar
. CMPI_RC_ERR_INVALID_PARAMETER
- value
is invalid.CMPI_RC_ERR_INVALID_PARAMETER
. The use of CMPI_null for type
is deprecated since CMPI 2.1. Specify the simple base type of the array instead.
The behavior of setting the array element's state to CMPI_nullValue when the function was not successful, is deprecated since CMPI 2.1. Instead, callers should assume that it is undefined whether the array element's state has changed when the function was not successful.