version 1.24, 2002/07/31 22:05:08
|
version 1.25, 2002/08/09 20:55:21
|
|
|
return *this; | return *this; |
} | } |
| |
CIMObject& CIMObject::operator=(const CIMClass& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMObject& CIMObject::operator=(const CIMInstance& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMObject::~CIMObject() | CIMObject::~CIMObject() |
{ | { |
Dec(_rep); | Dec(_rep); |
|
|
return (_rep == 0)? true : false; | return (_rep == 0)? true : false; |
} | } |
| |
|
Boolean CIMObject::isClass () const |
|
{ |
|
try |
|
{ |
|
const CIMClass c (*this); |
|
return true; |
|
} |
|
catch (DynamicCastFailed) |
|
{ |
|
return false; |
|
} |
|
} |
|
|
|
Boolean CIMObject::isInstance () const |
|
{ |
|
try |
|
{ |
|
const CIMInstance i (*this); |
|
return true; |
|
} |
|
catch (DynamicCastFailed) |
|
{ |
|
return false; |
|
} |
|
} |
|
|
Boolean CIMObject::identical(const CIMConstObject& x) const | Boolean CIMObject::identical(const CIMConstObject& x) const |
{ | { |
x._checkRep(); | x._checkRep(); |
|
|
return *this; | return *this; |
} | } |
| |
CIMConstObject& CIMConstObject::operator=(const CIMObject& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMConstObject& CIMConstObject::operator=(const CIMClass& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMConstObject& CIMConstObject::operator=(const CIMInstance& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMConstObject& CIMConstObject::operator=(const CIMConstClass& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMConstObject& CIMConstObject::operator=(const CIMConstInstance& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMConstObject::~CIMConstObject() | CIMConstObject::~CIMConstObject() |
{ | { |
Dec(_rep); | Dec(_rep); |