version 1.21, 2002/03/30 19:09:55
|
version 1.47, 2007/10/23 17:42:56
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
|
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_CIMClassRep_h | #ifndef Pegasus_CIMClassRep_h |
#define Pegasus_CIMClassRep_h | #define Pegasus_CIMClassRep_h |
| |
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
|
#include <Pegasus/Common/InternalException.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/CIMInstance.h> |
|
#include <Pegasus/Common/CIMPropertyList.h> |
|
#include <Pegasus/Common/Linkage.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
| |
// 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: |
| |
CIMClassRep( | CIMClassRep( |
const CIMReference& reference, |
const CIMName& className, |
const String& superClassName); |
const CIMName& superClassName); |
| |
virtual ~CIMClassRep(); | virtual ~CIMClassRep(); |
| |
|
|
| |
Boolean isAbstract() const; | Boolean isAbstract() const; |
| |
Boolean isTrueQualifier(const String& name) const; |
const CIMName& getSuperClassName() const { return _superClassName; } |
| |
const String& getSuperClassName() const { return _superClassName; } |
void setSuperClassName(const CIMName& superClassName); |
|
|
void setSuperClassName(const String& 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 String& name); |
Uint32 findMethod(const CIMName& name) const; |
| |
Uint32 findMethod(const String& name) const |
CIMMethod getMethod(Uint32 index); |
{ |
|
return ((CIMClassRep*)this)->findMethod(name); |
|
} |
|
|
|
Boolean existsMethod(const String& name); |
|
| |
Boolean existsMethod(const String& name) const |
CIMConstMethod getMethod(Uint32 index) const |
{ | { |
return ((CIMClassRep*)this)->existsMethod(name); |
return ((CIMClassRep*)this)->getMethod(index); |
} | } |
| |
CIMMethod getMethod(Uint32 pos); |
void removeMethod(Uint32 index); |
|
|
CIMConstMethod getMethod(Uint32 pos) const |
|
{ |
|
return ((CIMClassRep*)this)->getMethod(pos); |
|
} |
|
|
|
void removeMethod(Uint32 pos); |
|
| |
Uint32 getMethodCount() const; | Uint32 getMethodCount() const; |
| |
void resolve( | void resolve( |
DeclContext* context, | DeclContext* context, |
const String& nameSpace); |
const CIMNamespaceName& nameSpace); |
|
|
Boolean identical(const CIMClassRep* x) const; |
|
|
|
void toXml(Array<Sint8>& out) const; |
|
| |
void print(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const; |
virtual Boolean identical(const CIMObjectRep* x) const; |
| |
void toMof(Array<Sint8>& out) const; |
void toXml(Buffer& out) const; |
| |
void printMof(PEGASUS_STD(ostream)& os = PEGASUS_STD(cout)) const; |
void toMof(Buffer& out) const; |
| |
virtual CIMObjectRep* clone() const | virtual CIMObjectRep* clone() const |
{ | { |
return new CIMClassRep(*this); | return new CIMClassRep(*this); |
} | } |
| |
void getKeyNames(Array<String>& keyNames) const; |
void getKeyNames(Array<CIMName>& keyNames) const; |
| |
Boolean hasKeys() const; | Boolean hasKeys() const; |
| |
private: |
CIMInstance buildInstance(Boolean includeQualifiers, |
|
Boolean includeClassOrigin, |
|
const CIMPropertyList & propertyList) const; |
| |
CIMClassRep(); |
private: |
| |
CIMClassRep(const CIMClassRep& x); | CIMClassRep(const CIMClassRep& x); |
| |
CIMClassRep& operator=(const CIMClassRep& x) |
CIMClassRep(); // Unimplemented |
{ |
CIMClassRep& operator=(const CIMClassRep& x); // Unimplemented |
return *this; |
|
} |
|
| |
String _superClassName; |
CIMName _superClassName; |
Array<CIMMethod> _methods; | Array<CIMMethod> _methods; |
| |
friend class CIMClass; | friend class CIMClass; |
friend class CIMInstanceRep; | friend class CIMInstanceRep; |
|
friend class BinaryStreamer; |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |