version 1.1.2.14, 2009/09/18 10:14:13
|
version 1.1.2.21, 2009/10/06 14:50:46
|
|
|
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. |
*/ | */ |
|
|
* Determines whether the object has been initialized. | * Determines whether the object has been initialized. |
* @return True if the object has not been initialized, false otherwise. | * @return True if the object has not been initialized, false otherwise. |
*/ | */ |
Boolean isUninitialized( ) const {return (inst.base == NULL); }; |
Boolean isUninitialized( ) const {return (0 == inst.base); }; |
| |
/** | /** |
* 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; |
|
|
|
/** |
|
* 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 ! | * Get the class name of the instance. The caller has to make a copy ! |
|
|
| |
/** | /** |
* Get the class name of the instance. The caller has to make a copy ! | * Get the class name of the instance. The caller has to make a copy ! |
* @return The class name as UTF8. Return length of result string. |
* @param Return length of result string. |
|
* @return The class name as UTF8. |
*/ | */ |
const char* getClassName_l(Uint64 & length) const; | 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() |
|
*/ |
|
const Boolean isCompromised() const |
|
{ |
|
return inst.hdr->flags.isCompromised; |
|
} |
|
|
|
/** |
* 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, |
|
|
Boolean isArray, | Boolean isArray, |
Uint32 size); | Uint32 size); |
| |
void _setCIMValueAtNodeIndex(Uint32 node, CIMValueRep* valRep); |
void _setCIMValueAtNodeIndex( |
|
Uint32 node, |
|
CIMValueRep* valRep, |
|
CIMType realType); |
| |
void _getCIMValueFromSCMBUnion( |
static void _getCIMValueFromSCMBUnion( |
CIMValue& cimV, | CIMValue& cimV, |
const CIMType type, | const CIMType type, |
const Boolean isNull, | const Boolean isNull, |
const Boolean isArray, | const Boolean isArray, |
const Uint32 arraySize, | const Uint32 arraySize, |
const SCMBUnion& scmbUn, | const SCMBUnion& scmbUn, |
const char * base) const; |
const char * base); |
| |
void _getCIMValueFromSCMBValue( |
static void _getCIMValueFromSCMBValue( |
CIMValue& cimV, | CIMValue& cimV, |
const SCMBValue& scmbV, | const SCMBValue& scmbV, |
const char * base) const; |
const char * base); |
| |
CIMProperty _getCIMPropertyAtNodeIndex(Uint32 nodeIdx) const; | CIMProperty _getCIMPropertyAtNodeIndex(Uint32 nodeIdx) const; |
| |
|
|
Uint32 size, | Uint32 size, |
SCMBUnion & u); | SCMBUnion & u); |
| |
static void _setNonRefUnionValue( |
static void _setUnionValue( |
Uint64 start, | Uint64 start, |
SCMBMgmt_Header** pmem, | SCMBMgmt_Header** pmem, |
CIMType type, | CIMType type, |
|
Uint64 startNS, |
|
Uint64 lenNS, |
Union& u); | Union& u); |
| |
static void _setUnionArrayValue( | static void _setUnionArrayValue( |
|
|
SCMBMgmt_Header** pmem, | SCMBMgmt_Header** pmem, |
CIMType type, | CIMType type, |
Uint32& n, | Uint32& n, |
|
Uint64 startNS, |
|
Uint64 lenNS, |
Union& u); | Union& u); |
| |
SCMO_RC _getKeyBindingDataAtNodeIndex( | SCMO_RC _getKeyBindingDataAtNodeIndex( |
|
|
| |
SCMO_RC _setKeyBindingFromString(const char* name,String cimKeyBinding); | SCMO_RC _setKeyBindingFromString(const char* name,String cimKeyBinding); |
| |
Boolean _setCimKeyBindingStringToSCMOKeyBindigValue( |
Boolean _setCimKeyBindingStringToSCMOKeyBindingValue( |
const char* v, |
const String& kbs, |
Uint32 len, |
|
CIMType type, | CIMType type, |
SCMBKeyBindingValue& scmoKBV | SCMBKeyBindingValue& scmoKBV |
); | ); |
|
|
}; | }; |
| |
| |
|
#define PEGASUS_ARRAY_T SCMOInstance |
|
# include <Pegasus/Common/ArrayInter.h> |
|
#undef PEGASUS_ARRAY_T |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
| |