version 1.47, 2008/03/05 21:31:44
|
version 1.48, 2008/10/22 08:19:39
|
|
|
| |
CIMInstance::CIMInstance(const CIMInstance& x) | CIMInstance::CIMInstance(const CIMInstance& x) |
{ | { |
Inc(_rep = x._rep); |
_rep = x._rep; |
|
if (_rep) |
|
_rep->Inc(); |
} | } |
| |
CIMInstance::CIMInstance(const CIMObject& x) | CIMInstance::CIMInstance(const CIMObject& x) |
{ | { |
if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) | if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) |
throw DynamicCastFailedException(); | throw DynamicCastFailedException(); |
Inc(_rep); |
_rep->Inc(); |
} | } |
| |
CIMInstance::CIMInstance(const CIMName& className) | CIMInstance::CIMInstance(const CIMName& className) |
|
|
{ | { |
if (x._rep != _rep) | if (x._rep != _rep) |
{ | { |
Dec(_rep); |
if (_rep) |
Inc(_rep = x._rep); |
_rep->Dec(); |
|
_rep = x._rep; |
|
if (_rep) |
|
_rep->Inc(); |
} | } |
return *this; | return *this; |
} | } |
| |
CIMInstance::~CIMInstance() | CIMInstance::~CIMInstance() |
{ | { |
Dec(_rep); |
if (_rep) |
|
_rep->Dec(); |
} | } |
| |
const CIMName& CIMInstance::getClassName() const | const CIMName& CIMInstance::getClassName() const |
|
|
| |
CIMConstInstance::CIMConstInstance(const CIMConstInstance& x) | CIMConstInstance::CIMConstInstance(const CIMConstInstance& x) |
{ | { |
Inc(_rep = x._rep); |
_rep = x._rep; |
|
if (_rep) |
|
_rep->Inc(); |
} | } |
| |
CIMConstInstance::CIMConstInstance(const CIMInstance& x) | CIMConstInstance::CIMConstInstance(const CIMInstance& x) |
{ | { |
Inc(_rep = x._rep); |
_rep = x._rep; |
|
if (_rep) |
|
_rep->Inc(); |
} | } |
| |
CIMConstInstance::CIMConstInstance(const CIMObject& x) | CIMConstInstance::CIMConstInstance(const CIMObject& x) |
{ | { |
if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) | if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) |
throw DynamicCastFailedException(); | throw DynamicCastFailedException(); |
Inc(_rep); |
_rep->Inc(); |
} | } |
| |
CIMConstInstance::CIMConstInstance(const CIMConstObject& x) | CIMConstInstance::CIMConstInstance(const CIMConstObject& x) |
{ | { |
if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) | if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) |
throw DynamicCastFailedException(); | throw DynamicCastFailedException(); |
Inc(_rep); |
_rep->Inc(); |
} | } |
| |
CIMConstInstance::CIMConstInstance(const CIMName& className) | CIMConstInstance::CIMConstInstance(const CIMName& className) |
|
|
{ | { |
if (x._rep != _rep) | if (x._rep != _rep) |
{ | { |
Dec(_rep); |
if (_rep) |
Inc(_rep = x._rep); |
_rep->Dec(); |
|
_rep = x._rep; |
|
if (_rep) |
|
_rep->Inc(); |
} | } |
return *this; | return *this; |
} | } |
|
|
{ | { |
if (x._rep != _rep) | if (x._rep != _rep) |
{ | { |
Dec(_rep); |
if (_rep) |
Inc(_rep = x._rep); |
_rep->Dec(); |
|
_rep = x._rep; |
|
if (_rep) |
|
_rep->Inc(); |
} | } |
return *this; | return *this; |
} | } |
| |
CIMConstInstance::~CIMConstInstance() | CIMConstInstance::~CIMConstInstance() |
{ | { |
Dec(_rep); |
if (_rep) |
|
_rep->Dec(); |
} | } |
| |
const CIMName& CIMConstInstance::getClassName() const | const CIMName& CIMConstInstance::getClassName() const |