version 1.23, 2008/03/05 21:31:45
|
version 1.24, 2008/10/22 08:19:40
|
|
|
#include <Pegasus/Common/Config.h> | #include <Pegasus/Common/Config.h> |
#include <Pegasus/Common/InternalException.h> | #include <Pegasus/Common/InternalException.h> |
#include <Pegasus/Common/String.h> | #include <Pegasus/Common/String.h> |
#include <Pegasus/Common/Sharable.h> |
|
#include <Pegasus/Common/CIMValue.h> | #include <Pegasus/Common/CIMValue.h> |
#include <Pegasus/Common/Linkage.h> | #include <Pegasus/Common/Linkage.h> |
#include <Pegasus/Common/Buffer.h> | #include <Pegasus/Common/Buffer.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
class CIMParamValueRep : public Sharable |
class CIMParamValueRep |
{ | { |
public: | public: |
| |
|
|
CIMValue value, | CIMValue value, |
Boolean isTyped=true); | Boolean isTyped=true); |
| |
~CIMParamValueRep(); |
|
|
|
const String & getParameterName() const | const String & getParameterName() const |
{ | { |
return _parameterName; | return _parameterName; |
|
|
return new CIMParamValueRep(*this); | return new CIMParamValueRep(*this); |
} | } |
| |
|
void Inc() |
|
{ |
|
_refCounter++; |
|
} |
|
|
|
void Dec() |
|
{ |
|
if (_refCounter.decAndTestIfZero()) |
|
delete this; |
|
} |
|
|
private: | private: |
| |
CIMParamValueRep(const CIMParamValueRep& x); | CIMParamValueRep(const CIMParamValueRep& x); |
|
|
String _parameterName; | String _parameterName; |
CIMValue _value; | CIMValue _value; |
Boolean _isTyped; | Boolean _isTyped; |
|
|
|
// reference counter as member to avoid |
|
// virtual function resolution overhead |
|
AtomicInt _refCounter; |
|
|
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |