version 1.1, 2001/02/18 18:39:05
|
version 1.2, 2001/02/19 01:47:16
|
|
|
// Author: | // Author: |
// | // |
// $Log$ | // $Log$ |
|
// Revision 1.2 2001/02/19 01:47:16 mike |
|
// Renamed names of the form CIMConst to ConstCIM. |
|
// |
// Revision 1.1 2001/02/18 18:39:05 mike | // Revision 1.1 2001/02/18 18:39:05 mike |
// new | // new |
// | // |
// Revision 1.2 2001/02/18 03:56:00 mike | // Revision 1.2 2001/02/18 03:56:00 mike |
// Changed more class names (e.g., ConstClassDecl -> CIMConstClass) |
// Changed more class names (e.g., ConstClassDecl -> ConstCIMClass) |
// | // |
// Revision 1.1 2001/02/16 02:06:06 mike | // Revision 1.1 2001/02/16 02:06:06 mike |
// Renamed many classes and headers. | // Renamed many classes and headers. |
|
|
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class CIMConstClass; |
class ConstCIMClass; |
| |
/** The CIMClass class is used to represent CIM classes in Pegasus. In CIM, | /** The CIMClass class is used to represent CIM classes in Pegasus. In CIM, |
a class object may be a class or an associator. A CIM class must contain a | a class object may be a class or an associator. A CIM class must contain a |
|
|
@parm Class object for the class to be compared | @parm Class object for the class to be compared |
@return True if the classes are identical | @return True if the classes are identical |
*/ | */ |
Boolean identical(const CIMConstClass& x) const; |
Boolean identical(const ConstCIMClass& x) const; |
/// CIMMethod clone - ATTN: | /// CIMMethod clone - ATTN: |
CIMClass clone() const | CIMClass clone() const |
{ | { |
|
|
} | } |
| |
CIMClassRep* _rep; | CIMClassRep* _rep; |
friend class CIMConstClass; |
friend class ConstCIMClass; |
}; | }; |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
// | // |
// CIMConstClass |
// ConstCIMClass |
// | // |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
| |
class PEGASUS_COMMON_LINKAGE CIMConstClass |
class PEGASUS_COMMON_LINKAGE ConstCIMClass |
{ | { |
public: | public: |
| |
CIMConstClass() : _rep(0) |
ConstCIMClass() : _rep(0) |
{ | { |
| |
} | } |
| |
CIMConstClass(const CIMConstClass& x) |
ConstCIMClass(const ConstCIMClass& x) |
{ | { |
Inc(_rep = x._rep); | Inc(_rep = x._rep); |
} | } |
| |
CIMConstClass(const CIMClass& x) |
ConstCIMClass(const CIMClass& x) |
{ | { |
Inc(_rep = x._rep); | Inc(_rep = x._rep); |
} | } |
| |
CIMConstClass& operator=(const CIMConstClass& x) |
ConstCIMClass& operator=(const ConstCIMClass& x) |
{ | { |
if (x._rep != _rep) | if (x._rep != _rep) |
{ | { |
|
|
return *this; | return *this; |
} | } |
| |
CIMConstClass& operator=(const CIMClass& x) |
ConstCIMClass& operator=(const CIMClass& x) |
{ | { |
if (x._rep != _rep) | if (x._rep != _rep) |
{ | { |
|
|
| |
// Throws IllegalName if className argument not legal CIM identifier. | // Throws IllegalName if className argument not legal CIM identifier. |
| |
CIMConstClass( |
ConstCIMClass( |
const String& className, | const String& className, |
const String& superClassName = String()) | const String& superClassName = String()) |
{ | { |
_rep = new CIMClassRep(className, superClassName); | _rep = new CIMClassRep(className, superClassName); |
} | } |
| |
~CIMConstClass() |
~ConstCIMClass() |
{ | { |
Dec(_rep); | Dec(_rep); |
} | } |
|
|
_rep->print(); | _rep->print(); |
} | } |
| |
Boolean identical(const CIMConstClass& x) const |
Boolean identical(const ConstCIMClass& x) const |
{ | { |
x._checkRep(); | x._checkRep(); |
_checkRep(); | _checkRep(); |