version 1.44, 2006/01/30 16:16:46
|
version 1.51, 2008/11/12 17:22:32
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
|
// Adriann Schuur (schuur@de.ibm.com) PEP 164 |
|
// David Dillard, VERITAS Software Corp. |
|
// (david.dillard@veritas.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_CIMClassRep_h | #ifndef Pegasus_CIMClassRep_h |
|
|
#include <Pegasus/Common/CIMName.h> | #include <Pegasus/Common/CIMName.h> |
#include <Pegasus/Common/CIMObjectRep.h> | #include <Pegasus/Common/CIMObjectRep.h> |
#include <Pegasus/Common/CIMMethod.h> | #include <Pegasus/Common/CIMMethod.h> |
|
#include <Pegasus/Common/CIMMethodRep.h> |
#include <Pegasus/Common/CIMInstance.h> | #include <Pegasus/Common/CIMInstance.h> |
#include <Pegasus/Common/CIMPropertyList.h> | #include <Pegasus/Common/CIMPropertyList.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
|
|
| |
// ATTN: KS P3 -document the CIMClass and CIMObjectRep classes. | // ATTN: KS P3 -document the CIMClass and CIMObjectRep classes. |
| |
class PEGASUS_COMMON_LINKAGE CIMClassRep : public CIMObjectRep |
class CIMClassRep : public CIMObjectRep |
{ | { |
public: | public: |
| |
|
|
| |
const CIMName& getSuperClassName() const { return _superClassName; } | const CIMName& getSuperClassName() const { return _superClassName; } |
| |
void setSuperClassName(const CIMName& superClassName); |
void setSuperClassName(const CIMName& superClassName) |
|
{ |
|
_superClassName = superClassName; |
|
} |
| |
virtual void addProperty(const CIMProperty& x); | virtual void addProperty(const CIMProperty& x); |
| |
void addMethod(const CIMMethod& x); | void addMethod(const CIMMethod& x); |
| |
Uint32 findMethod(const CIMName& name) const; |
Uint32 findMethod(const CIMName& name) const |
|
{ |
|
return _methods.find(name, generateCIMNameTag(name)); |
|
} |
| |
CIMMethod getMethod(Uint32 index); |
CIMMethod getMethod(Uint32 index) |
|
{ |
|
return _methods[index]; |
|
} |
| |
CIMConstMethod getMethod(Uint32 index) const | CIMConstMethod getMethod(Uint32 index) const |
{ | { |
return ((CIMClassRep*)this)->getMethod(index); | return ((CIMClassRep*)this)->getMethod(index); |
} | } |
| |
void removeMethod(Uint32 index); |
void removeMethod(Uint32 index) |
|
{ |
|
_methods.remove(index); |
|
} |
| |
Uint32 getMethodCount() const; |
Uint32 getMethodCount() const |
|
{ |
|
return _methods.size(); |
|
} |
| |
void resolve( | void resolve( |
DeclContext* context, | DeclContext* context, |
|
|
| |
virtual Boolean identical(const CIMObjectRep* x) const; | virtual Boolean identical(const CIMObjectRep* x) const; |
| |
void toXml(Buffer& out) const; |
|
|
|
void toMof(Buffer& out) const; |
|
|
|
virtual CIMObjectRep* clone() const | virtual CIMObjectRep* clone() const |
{ | { |
return new CIMClassRep(*this); | return new CIMClassRep(*this); |
|
|
| |
private: | private: |
| |
CIMClassRep(); |
|
|
|
CIMClassRep(const CIMClassRep& x); | CIMClassRep(const CIMClassRep& x); |
| |
// This method is declared and made private so that the compiler does |
CIMClassRep(); // Unimplemented |
// not implicitly define a default copy constructor. |
CIMClassRep& operator=(const CIMClassRep& x); // Unimplemented |
CIMClassRep& operator=(const CIMClassRep& x) |
|
{ |
|
//PEGASUS_ASSERT(0); |
|
return *this; |
|
} |
|
| |
CIMName _superClassName; | CIMName _superClassName; |
Array<CIMMethod> _methods; |
typedef OrderedSet<CIMMethod, |
|
CIMMethodRep, |
|
PEGASUS_METHOD_ORDEREDSET_HASHSIZE> MethodSet; |
|
MethodSet _methods; |
| |
friend class CIMClass; | friend class CIMClass; |
friend class CIMInstanceRep; | friend class CIMInstanceRep; |
friend class BinaryStreamer; | friend class BinaryStreamer; |
|
friend class CIMBuffer; |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |