version 1.23, 2002/07/30 16:14:53
|
version 1.27, 2002/08/20 17:39:37
|
|
|
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->getPropertyCount(); | return _rep->getPropertyCount(); |
} | } |
| |
Boolean CIMObject::isNull() const |
Boolean CIMObject::isUninitialized() const |
{ | { |
return (_rep == 0)? true : false; | return (_rep == 0)? true : false; |
} | } |
| |
|
Boolean CIMObject::isClass () const |
|
{ |
|
try |
|
{ |
|
const CIMClass c (*this); |
|
return true; |
|
} |
|
catch (DynamicCastFailedException) |
|
{ |
|
return false; |
|
} |
|
} |
|
|
|
Boolean CIMObject::isInstance () const |
|
{ |
|
try |
|
{ |
|
const CIMInstance i (*this); |
|
return true; |
|
} |
|
catch (DynamicCastFailedException) |
|
{ |
|
return false; |
|
} |
|
} |
|
|
Boolean CIMObject::identical(const CIMConstObject& x) const | Boolean CIMObject::identical(const CIMConstObject& x) const |
{ | { |
x._checkRep(); | x._checkRep(); |
|
|
void CIMObject::_checkRep() const | void CIMObject::_checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
ThrowUninitializedHandle(); |
throw UninitializedObjectException(); |
} | } |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
|
|
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); |
|
|
return _rep->getPropertyCount(); | return _rep->getPropertyCount(); |
} | } |
| |
Boolean CIMConstObject::isNull() const |
Boolean CIMConstObject::isUninitialized() const |
{ | { |
return (_rep == 0)? true : false; | return (_rep == 0)? true : false; |
} | } |
| |
|
Boolean CIMConstObject::isClass() const |
|
{ |
|
try |
|
{ |
|
const CIMConstClass c(*this); |
|
return true; |
|
} |
|
catch (DynamicCastFailedException) |
|
{ |
|
return false; |
|
} |
|
} |
|
|
|
Boolean CIMConstObject::isInstance() const |
|
{ |
|
try |
|
{ |
|
const CIMConstInstance i(*this); |
|
return true; |
|
} |
|
catch (DynamicCastFailedException) |
|
{ |
|
return false; |
|
} |
|
} |
|
|
Boolean CIMConstObject::identical(const CIMConstObject& x) const | Boolean CIMConstObject::identical(const CIMConstObject& x) const |
{ | { |
x._checkRep(); | x._checkRep(); |
|
|
void CIMConstObject::_checkRep() const | void CIMConstObject::_checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
ThrowUninitializedHandle(); |
throw UninitializedObjectException(); |
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |