version 1.1.2.1, 2009/08/03 11:10:08
|
version 1.1.2.24, 2009/10/15 12:14:16
|
|
|
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
#include <Pegasus/Common/SCMO.h> | #include <Pegasus/Common/SCMO.h> |
|
#include <Pegasus/Common/SCMOClass.h> |
|
#include <Pegasus/Common/Union.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
public: | public: |
| |
/** | /** |
|
* A SCMOInstance can only be created by a SCMOClass |
|
*/ |
|
SCMOInstance(); |
|
|
|
/** |
* Creating a SCMOInstance using a SCMOClass. | * Creating a SCMOInstance using a SCMOClass. |
* @param baseClass A SCMOClass. | * @param baseClass A SCMOClass. |
*/ | */ |
|
|
* CIMInstance data into the new SCMOInstance. | * CIMInstance data into the new SCMOInstance. |
* @param baseClass The SCMOClass of this instance. | * @param baseClass The SCMOClass of this instance. |
* @param cimInstance A CIMInstace of the same class. | * @param cimInstance A CIMInstace of the same class. |
|
* @exception Exception if class name and name space does not match. |
|
* @exception |
|
* Exception if CIMInstance has more key bindings then the SCMOClass. |
|
* @exception |
|
* Exception if a key binding is not found as a key property |
|
* of the SCMOClass. |
|
* @exception Exception if a key binding does not match |
|
* the class definition. |
|
* @exception Exception if a property is not part of class definition. |
|
* @exception Exception if a property does not match the class definition. |
*/ | */ |
SCMOInstance(SCMOClass baseClass, const CIMInstance& cimInstance); | SCMOInstance(SCMOClass baseClass, const CIMInstance& cimInstance); |
| |
/** | /** |
|
* Builds a SCMOInstance from the given SCMOClass and copies all |
|
* CIMObjectPath data into the new SCMOInstance. |
|
* @param baseClass The SCMOClass of this instance. |
|
* @param cimInstance A CIMObjectpath of the same class. |
|
* @exception Exception if class name and name space does not match. |
|
* @exception |
|
* Exception if CIMInstance has more key bindings then the SCMOClass. |
|
* @exception |
|
* Exception if a key binding is not found as a key property |
|
* of the SCMOClass. |
|
* @exception Exception if a key binding does not match |
|
* the class definition. |
|
*/ |
|
SCMOInstance(SCMOClass baseClass, const CIMObjectPath& cimObj); |
|
|
|
/** |
* Converts the SCMOInstance into a CIMInstance. | * Converts the SCMOInstance into a CIMInstance. |
* It is a deep copy of the SCMOInstance into the CIMInstance. | * It is a deep copy of the SCMOInstance into the CIMInstance. |
* @param cimInstance An empty CIMInstance. | * @param cimInstance An empty CIMInstance. |
*/ | */ |
void getCIMInstance(CIMInstance& cimInstance) const; |
SCMO_RC getCIMInstance(CIMInstance& cimInstance) const; |
| |
/** | /** |
* Makes a deep copy of the instance. | * Makes a deep copy of the instance. |
* This creates a new copy of the instance. | * This creates a new copy of the instance. |
|
* @param objectPathOnly If set to true, only the object path relevant parts |
|
* host name and key bindings are part of the cloned instance. |
* @return A new copy of the SCMOInstance object. | * @return A new copy of the SCMOInstance object. |
*/ | */ |
SCMOInstance clone() const; |
SCMOInstance clone(Boolean objectPathOnly = false) const; |
|
|
|
/** |
|
* Retrieves the objectpath part of the SCMOInstance as an instance |
|
* of class CIMObjectPath. . |
|
* @param cimObj Reference to an instantiated CIMObjectPath to be |
|
* populated with the data from the SCMOInstance. |
|
* @return void |
|
*/ |
|
void getCIMObjectPath(CIMObjectPath& cimObj) const; |
| |
/** | /** |
* Returns the number of properties of the instance. | * Returns the number of properties of the instance. |
|
|
* Has to be copied by caller. | * Has to be copied by caller. |
* It is set to NULL if rc != SCMO_OK. | * It is set to NULL if rc != SCMO_OK. |
* @param pvalue Returns a pointer to the value of property. | * @param pvalue Returns a pointer to the value of property. |
* The value has to be copied by the caller ! |
* The value is strored in a SCMBUnion |
|
* and has to be copied by the caller ! |
* It returns NULL if rc != SCMO_OK. | * It returns NULL if rc != SCMO_OK. |
|
* |
* If the value is an array, the | * If the value is an array, the |
* value array is stored in continuous memory. | * value array is stored in continuous memory. |
* e.g. If the CIMType is CIMTYPE_UINT32: |
* e.g. (SCMBUnion*)value[0 to size-1] |
* value = (void*)Uint32[0 to size-1] |
* |
* If it is an array of CIMTYPE_STRING, an array |
* If the value is type of CIMTYPE_STRING, |
* of char* to the string values is returned. |
* the string is referenced by the structure |
* This array has to be freed by the caller ! |
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
|
* Only for strings the caller has to free pvalue ! |
* @param type Returns the CIMType of the property | * @param type Returns the CIMType of the property |
* It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. | * It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. |
* @param isArray Returns if the value is an array. | * @param isArray Returns if the value is an array. |
|
|
Uint32 pos, | Uint32 pos, |
const char** pname, | const char** pname, |
CIMType& type, | CIMType& type, |
const void** pvalue, |
const SCMBUnion** pvalue, |
Boolean& isArray, | Boolean& isArray, |
Uint32& size ) const; | Uint32& size ) const; |
| |
/** | /** |
|
* Gets the property name, type, and value addressed by a positional index. |
|
* The property name and value has to be copied by the caller ! |
|
* @param pos The positional index of the property |
|
* @param pname Returns the property name as '\0' terminated string. |
|
* Has to be copied by caller. |
|
* It is set to NULL if rc != SCMO_OK. |
|
* @param value Returns an absolute pointer to the value of property. |
|
* Sub-pointers are NOT resolved! |
|
* The value has to be copied by the caller ! |
|
* It returns NULL if rc != SCMO_OK. |
|
* @param valueBase Returns an absolute pointer to the base of value, |
|
* because subsequent pointers in the value are NOT |
|
* resolved. |
|
* @param propDef Returns an absolute pointer to the property definition |
|
* Sub-pointers are NOT resolved! |
|
* It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. |
|
* |
|
* @return SCMO_OK |
|
* SCMO_NULL_VALUE : The value is a null value. |
|
* SCMO_INDEX_OUT_OF_BOUND : Given index not found |
|
* |
|
*/ |
|
SCMO_RC getPropertyAt( |
|
Uint32 pos, |
|
SCMBValue** value, |
|
const char ** valueBase, |
|
SCMBClassProperty ** propDef) const; |
|
|
|
/** |
* Gets the type and value of the named property. | * Gets the type and value of the named property. |
* The value has to be copied by the caller ! | * The value has to be copied by the caller ! |
* @param name The property name | * @param name The property name |
* @param pvalue Returns a pointer to the value of property. | * @param pvalue Returns a pointer to the value of property. |
* The value has to be copied by the caller ! |
* The value is strored in a SCMBUnion |
|
* and has to be copied by the caller ! |
* It returns NULL if rc != SCMO_OK. | * It returns NULL if rc != SCMO_OK. |
|
* |
* If the value is an array, the | * If the value is an array, the |
* value array is stored in continuous memory. | * value array is stored in continuous memory. |
* e.g. If the CIMType is CIMTYPE_UINT32: |
* e.g. (SCMBUnion*)value[0 to size-1] |
* value = (void*)Uint32[0 to size-1] |
* |
* If it is an array of CIMTYPE_STRING, an array |
* If the value is type of CIMTYPE_STRING, |
* of char* to the string values is returned. |
* the string is referenced by the structure |
* This array has to be freed by the caller ! |
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
|
* Only for strings the caller has to free pvalue ! |
* @param type Returns the CIMType of the property | * @param type Returns the CIMType of the property |
* It is invalid if rc == SCMO_NOT_FOUND. | * It is invalid if rc == SCMO_NOT_FOUND. |
* @param isArray Returns if the value is an array. | * @param isArray Returns if the value is an array. |
|
|
SCMO_RC getProperty( | SCMO_RC getProperty( |
const char* name, | const char* name, |
CIMType& type, | CIMType& type, |
const void** pvalue, |
const SCMBUnion** pvalue, |
Boolean& isArray, | Boolean& isArray, |
Uint32& size ) const; | Uint32& size ) const; |
| |
|
|
* be set/replaced. | * be set/replaced. |
* @param name The name of the property to be set. | * @param name The name of the property to be set. |
* @param type The CIMType of the property | * @param type The CIMType of the property |
* @param value A pointer to property value. |
* @param value A pointer to the value to be set at the named property. |
|
* The value has to be in a SCMBUnion. |
* The value is copied into the instance | * The value is copied into the instance |
* If the value == NULL, a null value is assumed. | * If the value == NULL, a null value is assumed. |
* If the value is an array, the |
* If the value is an array, the value array has to be |
* value array must be stored in continuous memory. |
* stored in continuous memory. |
* e.g. If the CIMType is CIMTYPE_UINT32: |
* e.g. (SCMBUnion*)value[0 to size-1] |
* value = (void*)Uint32[0 to size-1] |
* |
|
* To store an array of size 0, The value pointer has to |
|
* not NULL ( value != NULL ) but the size has to be 0 |
|
* (size == 0). |
|
* |
|
* If the value is type of CIMTYPE_STRING, |
|
* the string is referenced by the structure |
|
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
* @param isArray Indicate that the value is an array. Default false. | * @param isArray Indicate that the value is an array. Default false. |
* @param size Returns the size of the array. If not an array this | * @param size Returns the size of the array. If not an array this |
* this parameter is ignorer. Default 0. | * this parameter is ignorer. Default 0. |
|
|
SCMO_RC setPropertyWithOrigin( | SCMO_RC setPropertyWithOrigin( |
const char* name, | const char* name, |
CIMType type, | CIMType type, |
void* value, |
const SCMBUnion* value, |
Boolean isArray=false, | Boolean isArray=false, |
Uint32 size = 0, | Uint32 size = 0, |
const char* origin = NULL); | const char* origin = NULL); |
| |
/** | /** |
* Rebuilds the key bindings off the property values |
* Rebuild of the key bindings from the property values |
* if no or incomplete key properties are set on the instance. | * if no or incomplete key properties are set on the instance. |
|
* @exception NoSuchProperty |
*/ | */ |
void rebuildKeyProperties(); |
void buildKeyBindingsFromProperties(); |
| |
/** | /** |
* Set/replace a property filter on an instance. | * Set/replace a property filter on an instance. |
|
|
* is still SCMO_OK. | * is still SCMO_OK. |
* @param index The node index. | * @param index The node index. |
* @param type The CIMType of the property | * @param type The CIMType of the property |
* @param value A pointer to property value. |
* @param pInVal A pointer to the value to be set at the named property. |
|
* The value has to be in a SCMBUnion. |
* The value is copied into the instance | * The value is copied into the instance |
* If the value is an array, the |
* If the value == NULL, a null value is assumed. |
* value array must be stored in continuous memory. |
* If the value is an array, the value array has to be |
* e.g. If the CIMType is CIMTYPE_UINT32: |
* stored in continuous memory. |
* value = (void*)Uint32[0 to size-1] |
* e.g. (SCMBUnion*)value[0 to size-1] |
|
* |
|
* To store an array of size 0, The value pointer has to |
|
* not NULL ( value != NULL ) but the size has to be 0 |
|
* (size == 0). |
|
* |
|
* If the value is type of CIMTYPE_STRING, |
|
* the string is referenced by the structure |
|
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
* @param isArray Indicate that the value is an array. Default false. | * @param isArray Indicate that the value is an array. Default false. |
* @param size The size of the array. If not an array this | * @param size The size of the array. If not an array this |
* this parameter is ignorer. Default 0. | * this parameter is ignorer. Default 0. |
|
|
SCMO_RC setPropertyWithNodeIndex( | SCMO_RC setPropertyWithNodeIndex( |
Uint32 node, | Uint32 node, |
CIMType type, | CIMType type, |
void* value, |
const SCMBUnion* pInVal, |
Boolean isArray=false, | Boolean isArray=false, |
Uint32 size = 0); | Uint32 size = 0); |
| |
/** | /** |
* Set/replace the named key binding |
* Set/replace the named key binding using binary data |
* @param name The key binding name. | * @param name The key binding name. |
* @param type The type as CIMKeyBinding::Type. |
* @param type The type as CIMType. |
* @parma value The value as string. |
* @param keyvalue A pointer to the binary key value. |
|
* The value is copied into the instance |
|
* If the value == NULL, a null value is assumed. |
|
* @param keyvalue A pointer to the value to be set at the key binding, |
|
* The keyvalue has to be in a SCMBUnion. |
|
* The keyvalue is copied into the instance. |
|
* If the keyvalue == NULL, a null value is assumed. |
|
* |
|
* If the keyvalue is type of CIMTYPE_STRING, |
|
* the string is referenced by the structure |
|
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
* @return SCMO_OK | * @return SCMO_OK |
|
* SCMO_INVALID_PARAMETER : Given name or pvalue |
|
* is a NULL pointer. |
* SCMO_TYPE_MISSMATCH : Given type does not | * SCMO_TYPE_MISSMATCH : Given type does not |
* match to key binding type | * match to key binding type |
* SCMO_NOT_FOUND : Given property name not found. | * SCMO_NOT_FOUND : Given property name not found. |
*/ | */ |
SCMO_RC setKeyBinding( | SCMO_RC setKeyBinding( |
const char* name, | const char* name, |
CIMKeyBinding::Type type, |
CIMType type, |
const char* pvalue); |
const SCMBUnion* keyvalue); |
|
|
|
/** |
|
* Set/replace the key binding at node |
|
* @param node The node index of the key. |
|
* @param type The type as CIMType. |
|
* @param keyvalue A pointer to the value to be set at the key binding, |
|
* The keyvalue has to be in a SCMBUnion. |
|
* The keyvalue is copied into the instance. |
|
* If the keyvalue == NULL, a null value is assumed. |
|
* |
|
* If the keyvalue is type of CIMTYPE_STRING, |
|
* the string is referenced by the structure |
|
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
|
* @return SCMO_OK |
|
* SCMO_INVALID_PARAMETER : Given pvalue is a NULL pointer. |
|
* SCMO_TYPE_MISSMATCH : Given type does not |
|
* match to key binding type |
|
* SCMO_INDEX_OUT_OF_BOUND : Given index is our of range. |
|
*/ |
|
SCMO_RC setKeyBindingAt( |
|
Uint32 node, |
|
CIMType type, |
|
const SCMBUnion* keyvalue); |
| |
/** | /** |
* Gets the key binding count. | * Gets the key binding count. |
* @return the number of key bindings set. | * @return the number of key bindings set. |
*/ | */ |
Uint32 getKeyBindingCount(); |
Uint32 getKeyBindingCount() const; |
| |
/** | /** |
* Get the indexed key binding. | * Get the indexed key binding. |
|
|
* @parm pname Returns the name. | * @parm pname Returns the name. |
* Has to be copied by caller. | * Has to be copied by caller. |
* It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. | * It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. |
* @param type Returns the type as CIMKeyBinding::Type. |
* @param type Returns the type as CIMType. |
* It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. | * It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. |
* @parma pvalue Returns the value as string. |
* @param keyvalue A pointer to the binary key value. |
* Has to be copied by caller. | * Has to be copied by caller. |
* It is only valid if rc == SCMO_OK. | * It is only valid if rc == SCMO_OK. |
* @return SCMO_OK | * @return SCMO_OK |
|
|
SCMO_RC getKeyBindingAt( | SCMO_RC getKeyBindingAt( |
Uint32 idx, | Uint32 idx, |
const char** pname, | const char** pname, |
CIMKeyBinding::Type& type, |
CIMType& type, |
const char** pvalue) const; |
const SCMBUnion** keyvalue) const; |
| |
/** | /** |
* Get the named key binding. | * Get the named key binding. |
* @parm name The name of the key binding. | * @parm name The name of the key binding. |
* @param type Returns the type as CIMKeyBinding::Type. |
* @param type Returns the type as CIMType. |
* It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. | * It is invalid if rc == SCMO_INDEX_OUT_OF_BOUND. |
* @parma value Returns the value as string. |
* @param keyvalue Returns a pointer to the value of keybinding. |
|
* The value is strored in a SCMBUnion |
|
* and has to be copied by the caller ! |
|
* It returns NULL if rc != SCMO_OK. |
|
* |
|
* If the value is type of CIMTYPE_STRING, |
|
* the string is referenced by the structure |
|
* SCMBUnion.extString: |
|
* pchar contains the absolut pointer to the string |
|
* length contains the size of the string |
|
* without trailing '\0'. |
|
* Only for strings the caller has to free pvalue ! |
|
* @param keyvalue A pointer to the binary key value. |
* Has to be copied by caller. | * Has to be copied by caller. |
* It is only valid if rc == SCMO_OK. | * It is only valid if rc == SCMO_OK. |
* @return SCMO_OK | * @return SCMO_OK |
|
|
*/ | */ |
SCMO_RC getKeyBinding( | SCMO_RC getKeyBinding( |
const char* name, | const char* name, |
CIMKeyBinding::Type& ptype, |
CIMType& ptype, |
const char** pvalue) const; |
const SCMBUnion** keyvalue) const; |
|
|
|
/** |
|
* Determines whether the c++ object has been initialized. |
|
* @return True if the c++ object has not been initialized, false otherwise. |
|
*/ |
|
Boolean isUninitialized( ) const {return (0 == inst.base); }; |
|
|
|
/** |
|
* Determines whether the instance is used as a class container. |
|
* @return True if the instance is used as a class container only. |
|
*/ |
|
Boolean isClassOnly( ) const |
|
{ |
|
return inst.hdr->flags.isClassOnly; |
|
} |
| |
/** | /** |
* Determines whether the object has been initialized. |
* Mark this instance to be a class only container. |
* @return True if the object has not been initialized, false otherwise. |
|
*/ | */ |
Boolean isUninitialized( ) const {return (inst.base == NULL); }; |
void setClassOnly( ) |
|
{ |
|
inst.hdr->flags.isClassOnly = true; |
|
} |
|
|
|
/** |
|
* Mark this instance is a real instance. |
|
*/ |
|
void clearClassOnly( ) |
|
{ |
|
inst.hdr->flags.isClassOnly = false; |
|
} |
| |
/** | /** |
* Determies if two objects are referencing to the same instance | * Determies if two objects are referencing to the same instance |
|
|
Boolean isSame(SCMOInstance& theInstance) const; | Boolean isSame(SCMOInstance& theInstance) const; |
| |
/** | /** |
|
* Sets the provided host name at the instance. |
|
* @param hostName The host name as UTF8. |
|
*/ |
|
void setHostName(const char* hostName); |
|
|
|
/** |
* Get the host name of the instance. The caller has to make a copy ! | * Get the host name of the instance. The caller has to make a copy ! |
* @return The host name as UTF8. | * @return The host name as UTF8. |
*/ | */ |
const char* getHostName() const; | const char* getHostName() const; |
| |
/** | /** |
* Sets the provided host name at the instance. |
* Get the host name of the instance. |
* @param hostName The host name as UTF8. |
* @param Return length of result string. |
|
* @return The class name as UTF8. |
*/ | */ |
void setHostName(const char* hostName); |
const char* getHostName_l(Uint64 & length) const; |
| |
/** | /** |
* Get the class name of the instance. The cabler has to make a copy ! |
* Sets the provided class name at the instance. By caling this function |
|
* the instance is in an inconsitacne state and is maked as isCompromised. |
|
* @param className The class name as UTF8. |
|
*/ |
|
void setClassName(const char* className); |
|
|
|
/** |
|
* Get the class name of the instance. The caller has to make a copy ! |
* @return The class name as UTF8. | * @return The class name as UTF8. |
*/ | */ |
const char* getClassName() const; | const char* getClassName() const; |
| |
/** | /** |
|
* Get the class name of the instance. The caller has to make a copy ! |
|
* @param Return length of result string. |
|
* @return The class name as UTF8. |
|
*/ |
|
const char* getClassName_l(Uint64 & length) const; |
|
|
|
/** |
|
* Sets the provided name space name at the instance. |
|
* By caling this function the instance is in an inconsitacne state and |
|
* is maked as isCompromised. |
|
* @param nameSpaceName The name space name as UTF8. |
|
*/ |
|
void setNameSpace(const char* nameSpace); |
|
|
|
/** |
* Get the name space of the instance. The caller has to make a copy ! | * Get the name space of the instance. The caller has to make a copy ! |
* @return The name space as UTF8. | * @return The name space as UTF8. |
*/ | */ |
const char* getNameSpace() const; | const char* getNameSpace() const; |
| |
/** | /** |
|
* Get the class name of the instance. The caller has to make a copy ! |
|
* @param Return length of result string. |
|
* @return The class name as UTF8. |
|
*/ |
|
const char* getNameSpace_l(Uint64 & length) const; |
|
|
|
/** |
|
* Is the name space or class name of the instance the origianl values |
|
* set by the used SCMOClass. |
|
* The class name and/or name space may differ with the associated class. |
|
* @return true if name space or class name was set manually by |
|
* setNameSpace() or setClassName() |
|
*/ |
|
Boolean isCompromised() const |
|
{ |
|
return inst.hdr->flags.isCompromised; |
|
}; |
|
|
|
|
|
/** |
|
* Mark the instance as a non validated instance. |
|
*/ |
|
void markAsCompromised() |
|
{ |
|
inst.hdr->flags.isCompromised = true; |
|
}; |
|
|
|
/** |
* To indicate the export processing ( eg. XMLWriter ) | * To indicate the export processing ( eg. XMLWriter ) |
* to include qualifiers for this instance. | * to include qualifiers for this instance. |
*/ | */ |
|
|
if (inst.hdr->refCount.decAndTestIfZero()) | if (inst.hdr->refCount.decAndTestIfZero()) |
{ | { |
// printf("\ninst.hdr->refCount=%u\n",inst.hdr->refCount.get()); | // printf("\ninst.hdr->refCount=%u\n",inst.hdr->refCount.get()); |
|
// All external references has to be destroyed. |
|
_destroyExternalReferences(); |
// The class has also be dereferenced. | // The class has also be dereferenced. |
delete inst.hdr->theClass; | delete inst.hdr->theClass; |
free(inst.base); | free(inst.base); |
|
|
} | } |
| |
}; | }; |
/** |
|
* A SCMOInstance can only be created by a SCMOClass |
|
*/ |
|
SCMOInstance(); |
|
| |
void _initSCMOInstance( |
|
SCMOClass* pClass, |
|
Boolean inclQual, |
|
Boolean inclOrigin); |
|
| |
|
void _destroyExternalReferences(); |
|
|
|
void _copyExternalReferences(); |
|
|
|
void _initSCMOInstance(SCMOClass* pClass); |
|
|
|
void _setCIMInstance(const CIMInstance& cimInstance); |
| |
SCMO_RC _getPropertyAtNodeIndex( | SCMO_RC _getPropertyAtNodeIndex( |
Uint32 pos, | Uint32 pos, |
const char** pname, | const char** pname, |
CIMType& type, | CIMType& type, |
const void** pvalue, |
const SCMBUnion** pvalue, |
Boolean& isArray, | Boolean& isArray, |
Uint32& size ) const; | Uint32& size ) const; |
| |
void _setPropertyAtNodeIndex( | void _setPropertyAtNodeIndex( |
Uint32 pos, | Uint32 pos, |
CIMType type, | CIMType type, |
void* value, |
const SCMBUnion* pInVal, |
Boolean isArray, | Boolean isArray, |
Uint32 size); | Uint32 size); |
| |
void* _getSCMBUnion( |
void _setCIMValueAtNodeIndex( |
|
Uint32 node, |
|
CIMValueRep* valRep, |
|
CIMType realType); |
|
|
|
static void _getCIMValueFromSCMBUnion( |
|
CIMValue& cimV, |
|
const CIMType type, |
|
const Boolean isNull, |
|
const Boolean isArray, |
|
const Uint32 arraySize, |
|
const SCMBUnion& scmbUn, |
|
const char * base); |
|
|
|
static void _getCIMValueFromSCMBValue( |
|
CIMValue& cimV, |
|
const SCMBValue& scmbV, |
|
const char * base); |
|
|
|
CIMProperty _getCIMPropertyAtNodeIndex(Uint32 nodeIdx) const; |
|
|
|
void _setCIMObjectPath(const CIMObjectPath& cimObj); |
|
|
|
SCMBUnion* _resolveSCMBUnion( |
CIMType type, | CIMType type, |
Boolean isArray, | Boolean isArray, |
Uint32 size, | Uint32 size, |
|
|
char* base) const; | char* base) const; |
| |
void _setSCMBUnion( | void _setSCMBUnion( |
void* value, |
const SCMBUnion* pInVal, |
CIMType type, | CIMType type, |
Boolean isArray, | Boolean isArray, |
Uint32 size, | Uint32 size, |
Uint64 start); |
SCMBUnion & u); |
| |
SCMO_RC _getKeyBindingAtNodeIndex( |
static void _setUnionValue( |
Uint32 pos, |
Uint64 start, |
|
SCMBMgmt_Header** pmem, |
|
CIMType type, |
|
Uint64 startNS, |
|
Uint64 lenNS, |
|
Union& u); |
|
|
|
static void _setUnionArrayValue( |
|
Uint64 start, |
|
SCMBMgmt_Header** pmem, |
|
CIMType type, |
|
Uint32& n, |
|
Uint64 startNS, |
|
Uint64 lenNS, |
|
Union& u); |
|
|
|
SCMO_RC _getKeyBindingDataAtNodeIndex( |
|
Uint32 node, |
const char** pname, | const char** pname, |
CIMKeyBinding::Type& ptype, |
Uint32 & pnameLen, |
const char** pvalue) const; |
CIMType& type, |
|
const SCMBUnion** pdata) const; |
|
|
|
void _copyKeyBindings(SCMOInstance& targetInst) const; |
| |
Uint32 _initPropFilterWithKeys(); | Uint32 _initPropFilterWithKeys(); |
| |
|
|
| |
void _clearPropertyFilter(); | void _clearPropertyFilter(); |
| |
|
void _setKeyBindingFromSCMBUnion( |
|
CIMType type, |
|
const SCMBUnion& u, |
|
const char * uBase, |
|
SCMBKeyBindingValue& keyData); |
|
|
|
SCMO_RC _setKeyBindingFromString( |
|
const char* name, |
|
CIMType type, |
|
String cimKeyBinding); |
|
|
|
SCMBUserKeyBindingElement* _getUserDefinedKeyBinding( |
|
const char* name, |
|
Uint32 nameLen, |
|
CIMType type); |
|
|
|
void _setUserDefinedKeyBinding( |
|
SCMBUserKeyBindingElement& theInsertElement, |
|
char* elementBase); |
|
/** |
|
* Set a SCMO user defined key binding using the class CIM type tolerating |
|
* CIM key binding types converted to CIM types by fuction |
|
* _CIMTypeFromKeyBindingType(). |
|
* |
|
* @parm classType The type of the key binding in the class definition |
|
* @parm setType The type of the key binding to be set. |
|
* @param keyValue A pointer to the key binding to be set. |
|
* @param kbValue Out parameter, the SCMO keybinding to be set. |
|
* |
|
**/ |
|
SCMO_RC _setKeyBindingTypeTolerate( |
|
CIMType classType, |
|
CIMType setType, |
|
const SCMBUnion* keyValue, |
|
SCMBKeyBindingValue& kbValue); |
|
|
|
CIMType _CIMTypeFromKeyBindingType( |
|
const char* key, |
|
CIMKeyBinding::Type t); |
|
|
|
SCMO_RC _getUserKeyBindingNodeIndex(Uint32& node, const char* name) const; |
|
|
|
SCMBUserKeyBindingElement* _getUserDefinedKeyBindingAt(Uint32 index) const; |
|
|
|
Boolean _setCimKeyBindingStringToSCMOKeyBindingValue( |
|
const String& kbs, |
|
CIMType type, |
|
SCMBKeyBindingValue& scmoKBV |
|
); |
|
|
|
|
union{ | union{ |
// To access the instance main structure | // To access the instance main structure |
SCMBInstance_Main *hdr; | SCMBInstance_Main *hdr; |
|
|
| |
friend class SCMOClass; | friend class SCMOClass; |
friend class SCMODump; | friend class SCMODump; |
|
friend class SCMOXmlWriter; |
}; | }; |
| |
| |
|
#define PEGASUS_ARRAY_T SCMOInstance |
|
# include <Pegasus/Common/ArrayInter.h> |
|
#undef PEGASUS_ARRAY_T |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
| |