version 1.12, 2001/06/16 17:30:34
|
version 1.18, 2001/12/22 02:15:15
|
|
|
#define Pegasus_CIMClassRep_h | #define Pegasus_CIMClassRep_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/Exception.h> |
#include <Pegasus/Common/CIMObjectRep.h> |
#include <Pegasus/Common/String.h> |
|
#include <Pegasus/Common/CIMQualifier.h> |
|
#include <Pegasus/Common/CIMQualifierList.h> |
|
#include <Pegasus/Common/CIMProperty.h> |
|
#include <Pegasus/Common/CIMMethod.h> | #include <Pegasus/Common/CIMMethod.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
class CIMConstClass; | class CIMConstClass; |
class CIMInstanceRep; | class CIMInstanceRep; |
| |
class PEGASUS_COMMON_LINKAGE CIMClassRep : public Sharable |
class PEGASUS_COMMON_LINKAGE CIMClassRep : public CIMObjectRep |
{ | { |
public: | public: |
| |
|
|
const String& className, | const String& className, |
const String& superClassName); | const String& superClassName); |
| |
~CIMClassRep(); |
virtual ~CIMClassRep(); |
| |
Boolean isAssociation() const; | Boolean isAssociation() const; |
| |
Boolean isAbstract() const; | Boolean isAbstract() const; |
| |
const String& getClassName() const { return _className; } |
|
|
|
const String& getSuperClassName() const { return _superClassName; } | const String& getSuperClassName() const { return _superClassName; } |
| |
void setSuperClassName(const String& superClassName); | void setSuperClassName(const String& superClassName); |
| |
void addQualifier(const CIMQualifier& qualifier) |
virtual void addProperty(const CIMProperty& x); |
{ |
|
_qualifiers.add(qualifier); |
|
} |
|
|
|
Uint32 findQualifier(const String& name) const |
|
{ |
|
return _qualifiers.find(name); |
|
} |
|
|
|
Boolean existsQualifier(const String& name) const |
|
{ |
|
return ((_qualifiers.find(name) != PEG_NOT_FOUND) ? true : false); |
|
} |
|
|
|
CIMQualifier getQualifier(Uint32 pos) |
|
{ |
|
return _qualifiers.getQualifier(pos); |
|
} |
|
|
|
CIMConstQualifier getQualifier(Uint32 pos) const |
|
{ |
|
return _qualifiers.getQualifier(pos); |
|
} |
|
|
|
Uint32 getQualifierCount() const |
|
{ |
|
return _qualifiers.getCount(); |
|
} |
|
|
|
void removeQualifier(Uint32 pos) |
|
{ |
|
_qualifiers.removeQualifier(pos); |
|
} |
|
|
|
void addProperty(const CIMProperty& x); |
|
|
|
|
|
Uint32 findProperty(const String& name); |
|
|
|
Uint32 findProperty(const String& name) const |
|
{ |
|
return ((CIMClassRep*)this)->findProperty(name); |
|
} |
|
|
|
Boolean existsProperty(const String& name); |
|
|
|
Boolean existsProperty(const String& name) const |
|
{ |
|
return ((CIMClassRep*)this)->existsProperty(name); |
|
} |
|
|
|
CIMProperty getProperty(Uint32 pos); |
|
|
|
CIMConstProperty getProperty(Uint32 pos) const |
|
{ |
|
return ((CIMClassRep*)this)->getProperty(pos); |
|
} |
|
|
|
void removeProperty(Uint32 pos); |
|
|
|
|
|
Uint32 getPropertyCount() const; |
|
| |
void addMethod(const CIMMethod& x); | void addMethod(const CIMMethod& x); |
| |
|
|
return ((CIMClassRep*)this)->existsMethod(name); | return ((CIMClassRep*)this)->existsMethod(name); |
} | } |
| |
|
|
CIMMethod getMethod(Uint32 pos); | CIMMethod getMethod(Uint32 pos); |
| |
CIMConstMethod getMethod(Uint32 pos) const | CIMConstMethod getMethod(Uint32 pos) const |
|
|
DeclContext* context, | DeclContext* context, |
const String& nameSpace); | const String& nameSpace); |
| |
|
Boolean identical(const CIMClassRep* x) const; |
|
|
void toXml(Array<Sint8>& out) const; | void toXml(Array<Sint8>& out) const; |
| |
void print(PEGASUS_STD(ostream) &o=PEGASUS_STD(cout)) const; |
void print(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const; |
| |
Boolean identical(const CIMClassRep* x) const; |
void toMof(Array<Sint8>& out) const; |
|
|
|
void printMof(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const; |
| |
CIMClassRep* clone() const |
virtual CIMObjectRep* clone() const |
{ | { |
return new CIMClassRep(*this); | return new CIMClassRep(*this); |
} | } |
| |
/** Return the names of all properties which bear a true key qualifier. |
|
Sort the keys in ascending order. |
|
*/ |
|
void getKeyNames(Array<String>& keyNames) const; | void getKeyNames(Array<String>& keyNames) const; |
| |
|
Boolean hasKeys() const; |
|
|
private: | private: |
| |
CIMClassRep(); | CIMClassRep(); |
| |
CIMClassRep(const CIMClassRep& x); | CIMClassRep(const CIMClassRep& x); |
| |
CIMClassRep& operator=(const CIMClassRep& x); |
CIMClassRep& operator=(const CIMClassRep& x) |
|
{ |
|
return *this; |
|
} |
| |
String _className; |
|
String _superClassName; | String _superClassName; |
CIMQualifierList _qualifiers; |
|
Array<CIMProperty> _properties; |
|
Array<CIMMethod> _methods; | Array<CIMMethod> _methods; |
Boolean _resolved; |
|
| |
friend class CIMClass; | friend class CIMClass; |
friend class CIMInstanceRep; | friend class CIMInstanceRep; |