version 1.14, 2002/05/03 05:16:16
|
version 1.18, 2002/05/14 03:27:25
|
|
|
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) | // Author: Mike Brasher (mbrasher@bmc.com) |
// | // |
// Modified By: |
// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
Inc(_rep = x._rep); | Inc(_rep = x._rep); |
} | } |
| |
CIMInstance::CIMInstance(const CIMObject& x) |
CIMInstance::CIMInstance(const CIMObject& x) throw(DynamicCastFailed) |
{ | { |
// ATTN-RK-P1-20020502: Need to Inc(_rep)? |
|
if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) | if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) |
throw DynamicCastFailed(); | throw DynamicCastFailed(); |
} |
Inc(_rep); |
|
|
CIMInstance::CIMInstance(const CIMObject& x, NoThrow&) |
|
{ |
|
// ATTN-RK-P1-20020502: Need to Inc(_rep)? |
|
_rep = dynamic_cast<CIMInstanceRep*>(x._rep); |
|
} | } |
| |
CIMInstance::CIMInstance(const String& className) | CIMInstance::CIMInstance(const String& className) |
|
|
return _rep->getPropertyCount(); | return _rep->getPropertyCount(); |
} | } |
| |
CIMInstance::operator int() const |
Boolean CIMInstance::isNull() const |
{ | { |
return (_rep != 0); |
return (_rep == 0)? true : false; |
} | } |
| |
Boolean CIMInstance::identical(const CIMConstInstance& x) const | Boolean CIMInstance::identical(const CIMConstInstance& x) const |
|
|
void CIMInstance::_checkRep() const | void CIMInstance::_checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
ThrowUnitializedHandle(); |
ThrowUninitializedHandle(); |
} | } |
| |
//////////////////////////////////////////////////////////////////////////////// | //////////////////////////////////////////////////////////////////////////////// |
|
|
Inc(_rep = x._rep); | Inc(_rep = x._rep); |
} | } |
| |
CIMConstInstance::CIMConstInstance(const CIMObject& x) |
CIMConstInstance::CIMConstInstance(const CIMObject& x) throw(DynamicCastFailed) |
{ | { |
// ATTN-RK-P1-20020502: Need to Inc(_rep)? |
|
if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) | if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) |
throw DynamicCastFailed(); | throw DynamicCastFailed(); |
|
Inc(_rep); |
} | } |
| |
CIMConstInstance::CIMConstInstance(const CIMConstObject& x) | CIMConstInstance::CIMConstInstance(const CIMConstObject& x) |
|
throw(DynamicCastFailed) |
{ | { |
// ATTN-RK-P1-20020502: Need to Inc(_rep)? |
|
if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) | if (!(_rep = dynamic_cast<CIMInstanceRep*>(x._rep))) |
throw DynamicCastFailed(); | throw DynamicCastFailed(); |
} |
Inc(_rep); |
|
|
CIMConstInstance::CIMConstInstance(const CIMObject& x, NoThrow&) |
|
{ |
|
// ATTN-RK-P1-20020502: Need to Inc(_rep)? |
|
_rep = dynamic_cast<CIMInstanceRep*>(x._rep); |
|
} |
|
|
|
CIMConstInstance::CIMConstInstance(const CIMConstObject& x, NoThrow&) |
|
{ |
|
// ATTN-RK-P1-20020502: Need to Inc(_rep)? |
|
_rep = dynamic_cast<CIMInstanceRep*>(x._rep); |
|
} | } |
| |
CIMConstInstance::CIMConstInstance(const String& className) | CIMConstInstance::CIMConstInstance(const String& className) |
|
|
return _rep->getPropertyCount(); | return _rep->getPropertyCount(); |
} | } |
| |
CIMConstInstance::operator int() const |
Boolean CIMConstInstance::isNull() const |
{ | { |
return (_rep != 0); |
return (_rep == 0)? true : false; |
} | } |
| |
void CIMConstInstance::toXml(Array<Sint8>& out) const | void CIMConstInstance::toXml(Array<Sint8>& out) const |
|
|
void CIMConstInstance::_checkRep() const | void CIMConstInstance::_checkRep() const |
{ | { |
if (!_rep) | if (!_rep) |
ThrowUnitializedHandle(); |
ThrowUninitializedHandle(); |
|
} |
|
|
|
|
|
Boolean operator==(const CIMInstance& x, const CIMInstance& y) |
|
{ |
|
return x.identical(y); |
} | } |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |