CMPI 2.1.0 API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Fields
CMPIPredicateFT Struct Reference

Function table of CMPIPredicate 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 )(CMPIPredicate *pr)
 Release a CMPPredicate object. More...
 
CMPIPredicate *(* clone )(const CMPIPredicate *pr, CMPIStatus *rc)
 Create an independent copy of a CMPIPredicate object. More...
 
CMPIStatus(* getData )(const CMPIPredicate *pr, CMPIType *type, CMPIPredOp *prop, CMPIString **lhs, CMPIString **rhs)
 Get the predicate components of a CMPIPredicate object. More...
 
CMPIBoolean(* evaluateUsingAccessor )(const CMPIPredicate *pr, CMPIAccessor *accessorFnc, void *parm, CMPIStatus *rc)
 Test whether the properties returned by an accessor function match the predicate in a CMPIPredicate object. More...
 

Detailed Description

Function table of CMPIPredicate encapsulated data type object.

Capabilities:
Part of the Query Normalization capability.

Field Documentation

CMPIVersion CMPIPredicateFT::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(* CMPIPredicateFT::release)(CMPIPredicate *pr)

Release a CMPPredicate object.

CMPIPredicateFT.release() releases a CMPIPredicate 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).

Parameters
prPoints to the CMPIPredicate object that is to be released. That object shall have been created using CMPIPredicateFT.clone().
Returns
CMPIStatus structure containing the function return status.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_NOT_SUPPORTED - Function is not supported by the MB. (Deprecated)
  • CMPI_RC_ERR_INVALID_HANDLE - The pr handle is invalid.
Convenience Function
CMRelease()
Capabilities:
Part of the Query Normalization capability.
Deprecated:
The return code CMPI_RC_ERR_NOT_SUPPORTED of this function is deprecated since CMPI 2.1. If the Query Normalization capability is not available, this function cannot be called by the MI because no instance of its encapsulated data type can exist.
CMPIPredicate*(* CMPIPredicateFT::clone)(const CMPIPredicate *pr, CMPIStatus *rc)

Create an independent copy of a CMPIPredicate object.

CMPIPredicateFT.clone() creates an independent copy of a CMPIPredicate object.

Parameters
prPoints to the CMPIPredicate object that is to be copied.
[out]rcIf not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status.
Returns

If successful, a pointer to the copied CMPIPredicate object will be returned.

The returned CMPIPredicate object shall be explicitly released by the MI using CMPIPredicateFT.release().

If not successful, NULL will be returned.

Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_NOT_SUPPORTED - Function is not supported by the MB. (Deprecated)
  • CMPI_RC_ERR_INVALID_HANDLE - The pr handle is invalid.
Convenience Function
CMClone()
Capabilities:
Part of the Query Normalization capability.
Deprecated:
The return code CMPI_RC_ERR_NOT_SUPPORTED of this function is deprecated since CMPI 2.1. If the Query Normalization capability is not available, this function cannot be called by the MI because no instance of its encapsulated data type can exist.
CMPIStatus(* CMPIPredicateFT::getData)(const CMPIPredicate *pr, CMPIType *type, CMPIPredOp *prop, CMPIString **lhs, CMPIString **rhs)

Get the predicate components of a CMPIPredicate object.

CMPIPredicateFT.getData() gets the predicate components of a CMPIPredicate object.

The CMPIString objects returned by lhs and rhs shall not be explicitly released by the MI, because they may be internal objects of the CMPIContext object which will be released along with that object, or new objects created by the MB which will be automatically released by the MB (see Subclause 4.1.7 of the CMPI Standard).

Parameters
prPoints to the CMPIPredicate object for this function.
[out]typeIf not NULL, points to a CMPIType structure that upon success will have been updated with the data type of the predicate.
[out]propIf not NULL, points to a CMPIPredOp object that upon success will have been updated with the predicate operation.
[out]lhsIf not NULL, points to a pointer to a CMPIString object that upon success will have been updated with the address of a CMPIString object representing the left-hand side of the predicate.
[out]rhsIf not NULL, points to a pointer to a CMPIString object that upon success will have been updated with the address of a CMPIString object representing the right-hand side of the predicate.
Returns

A CMPIStatus structure indicating the function return status will be returned.

If not successful, lhs and rhs will be set to NULL, and the state of type and prop is undefined.

Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_NOT_SUPPORTED - Function is not supported by the MB. (Deprecated)
  • CMPI_RC_ERR_INVALID_HANDLE - The pr handle is invalid.
Convenience Function
CMGetPredicateData()
Capabilities:
Part of the Query Normalization capability.
Deprecated:
The return code CMPI_RC_ERR_NOT_SUPPORTED of this function is deprecated since CMPI 2.1. If the Query Normalization capability is not available, this function cannot be called by the MI because no instance of its encapsulated data type can exist.
CMPIBoolean(* CMPIPredicateFT::evaluateUsingAccessor)(const CMPIPredicate *pr, CMPIAccessor *accessorFnc, void *parm, CMPIStatus *rc)

Test whether the properties returned by an accessor function match the predicate in a CMPIPredicate object.

CMPIPredicateFT.evaluateUsingAccessor() tests whether the properties returned by an accessor function match the predicate in a CMPIPredicate object.

The CMPIString objects returned by lhs and rhs shall not be explicitly released by the MI, because they may be internal objects of the CMPIContext object which will be released along with that object, or new objects created by the MB which will be automatically released by the MB (see Subclause 4.1.7 of the CMPI Standard).

Parameters
prPoints to the CMPIPredicate object for this function.
accessorFncPoints to a property value accessor function. The evaluation process will invoke this function to request a CMPIData structure for a particular property. For a definition of the signature of the accessor function, see CMPIAccessor.
parmA parameter that will be passed to the accessor function and can be used for providing context data to the accessor function.
[out]rcIf not NULL, points to a CMPIStatus structure that upon return will have been updated with the function return status.
Returns
If successful, a CMPIBoolean value indicating the test result will be returned, as follows:
  • True indicates that the properties returned by the accessor function match the predicate;
  • False indicates that this is not the case.
If not successful, false will be returned.
Errors
The function return status will indicate one of the following CMPIrc codes:
  • CMPI_RC_OK - Function successful.
  • CMPI_RC_ERR_INVALID_HANDLE - The pr handle is invalid.
  • CMPI_RC_ERR_INVALID_PARAMETER - accessorFnc is invalid.
Convenience Function
CMEvaluatePredicateUsingAccessor()
Capabilities:
Part of the Query Normalization capability.
Change:
In CMPI 2.1, added the return code CMPI_RC_ERR_INVALID_PARAMETER.
Bug:
The CMPI Standard declares the accessor argument of this function with a const in its type: const CMPIAccessor* accessor. The const is redundant and is being warned about by some compiler. The const has been removed in the header files and should be removed in the specification as well.

The documentation for this struct was generated from the following file: