version 1.1.2.6, 2009/09/18 09:11:11
|
version 1.1.2.11, 2009/10/06 14:50:46
|
|
|
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
#include <Pegasus/Common/SCMO.h> | #include <Pegasus/Common/SCMO.h> |
#include <Pegasus/Common/CIMClass.h> | #include <Pegasus/Common/CIMClass.h> |
|
#include <Pegasus/Common/CIMClassRep.h> |
|
#include <Pegasus/Common/CIMObjectRep.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
* @param nameSpaceName The namespace for the class, optional. | * @param nameSpaceName The namespace for the class, optional. |
* @return | * @return |
*/ | */ |
SCMOClass(CIMClass& theCIMClass, const char* nameSpaceName=NULL ); |
SCMOClass(const CIMClass& theCIMClass, const char* nameSpaceName=0 ); |
| |
/** | /** |
* Copy constructor for the SCMO class, used to implement refcounting. | * Copy constructor for the SCMO class, used to implement refcounting. |
|
|
} | } |
| |
/** | /** |
|
* Converts the SCMOClass into a CIMClass. |
|
* It is a deep copy of the SCMOClass into the CIMClass. |
|
* @param cimClass An empty CIMClass. |
|
*/ |
|
void getCIMClass(CIMClass& cimClass) const; |
|
|
|
/** |
* Gets the key property names as a string array | * Gets the key property names as a string array |
* @return An Array of String objects containing the names of the key | * @return An Array of String objects containing the names of the key |
* properties. | * properties. |
|
|
* 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 (cls.base == NULL); }; |
Boolean isUninitialized( ) const {return (cls.base == 0); }; |
| |
static StrLit qualifierNameStrLit(Uint32 num) | static StrLit qualifierNameStrLit(Uint32 num) |
{ | { |
|
|
if (cls.hdr->refCount.decAndTestIfZero()) | if (cls.hdr->refCount.decAndTestIfZero()) |
{ | { |
// printf("\ncls.hdr->refCount=%u\n",cls.hdr->refCount.get()); | // printf("\ncls.hdr->refCount=%u\n",cls.hdr->refCount.get()); |
|
_destroyExternalReferences(); |
free(cls.base); | free(cls.base); |
cls.base=NULL; |
cls.base=0; |
} | } |
else | else |
{ | { |
|
|
| |
}; | }; |
| |
|
void _destroyExternalReferences(); |
|
|
/** | /** |
* Constructs an uninitialized SCMOClass object. | * Constructs an uninitialized SCMOClass object. |
*/ | */ |
SCMOClass(); | SCMOClass(); |
| |
|
inline void _initSCMOClass(); |
|
|
SCMO_RC _getProperyNodeIndex(Uint32& node, const char* name) const; | SCMO_RC _getProperyNodeIndex(Uint32& node, const char* name) const; |
SCMO_RC _getKeyBindingNodeIndex(Uint32& node, const char* name) const; | SCMO_RC _getKeyBindingNodeIndex(Uint32& node, const char* name) const; |
| |
void _setClassQualifers(CIMClass& theCIMClass); |
void _setClassQualifers(const CIMQualifierList& theQualifierList); |
|
|
QualifierNameEnum _setQualifier( | QualifierNameEnum _setQualifier( |
Uint64 start, | Uint64 start, |
const CIMQualifier& theCIMQualifier); | const CIMQualifier& theCIMQualifier); |
| |
void _setClassProperties(CIMClass& theCIMClass); |
void _setClassProperties(PropertySet& theCIMProperties); |
void _setProperty(Uint64 start, |
|
|
void _setProperty( |
|
Uint64 start, |
Boolean* isKey, | Boolean* isKey, |
const CIMProperty& theCIMProperty); | const CIMProperty& theCIMProperty); |
|
|
Boolean _setPropertyQualifiers( | Boolean _setPropertyQualifiers( |
Uint64 start, | Uint64 start, |
const CIMQualifierList& theQualifierList); | const CIMQualifierList& theQualifierList); |
|
|
void _setClassKeyBinding(Uint64 start, const CIMProperty& theCIMProperty); | void _setClassKeyBinding(Uint64 start, const CIMProperty& theCIMProperty); |
void _insertPropertyIntoOrderedSet(Uint64 start, Uint32 newIndex); | void _insertPropertyIntoOrderedSet(Uint64 start, Uint32 newIndex); |
void _insertKeyBindingIntoOrderedSet(Uint64 start, Uint32 newIndex); | void _insertKeyBindingIntoOrderedSet(Uint64 start, Uint32 newIndex); |
void _clearKeyPropertyMask(); |
|
void _setPropertyAsKeyInMask(Uint32 i); | void _setPropertyAsKeyInMask(Uint32 i); |
Boolean _isPropertyKey(Uint32 i); | Boolean _isPropertyKey(Uint32 i); |
| |
void _setValue(Uint64 start, const CIMValue& theCIMValue); | void _setValue(Uint64 start, const CIMValue& theCIMValue); |
|
|
QualifierNameEnum _getSCMOQualifierNameEnum(const CIMName& theCIMname); | QualifierNameEnum _getSCMOQualifierNameEnum(const CIMName& theCIMname); |
Boolean _isSamePropOrigin(Uint32 node, const char* origin) const; | Boolean _isSamePropOrigin(Uint32 node, const char* origin) const; |
| |
const char* _getPropertyNameAtNode(Uint32 propNode) const; | const char* _getPropertyNameAtNode(Uint32 propNode) const; |
| |
void _setUnionValue(SCMBUnion& scmoU,CIMType type,Union& cimU); |
SCMO_RC _isNodeSameType( |
|
|
inline SCMO_RC _isNodeSameType( |
|
Uint32 node, | Uint32 node, |
CIMType type, | CIMType type, |
Boolean isArray) const; |
Boolean isArray, |
|
CIMType& realType) const; |
|
|
|
CIMProperty _getCIMPropertyAtNodeIndex(Uint32 nodeIdx) const; |
|
static void _getCIMQualifierFromSCMBQualifier( |
|
CIMQualifier& theCIMQualifier, |
|
const SCMBQualifier& scmbQualifier, |
|
const char* base); |
| |
union{ | union{ |
// To access the class main structure | // To access the class main structure |
|
|
friend class SCMOInstance; | friend class SCMOInstance; |
friend class SCMODump; | friend class SCMODump; |
friend class SCMOXmlWriter; | friend class SCMOXmlWriter; |
|
friend class SCMOClassCache; |
}; | }; |
| |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |
| |
#endif | #endif |