version 1.2, 2001/12/13 14:53:52
|
version 1.11, 2002/08/20 17:39:37
|
|
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// The Open Group, Tivoli Systems | // The Open Group, Tivoli Systems |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
|
|
// | // |
// Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) | // Author: Nitin Upasani, Hewlett-Packard Company (Nitin_Upasani@hp.com) |
// | // |
// Modified By: |
// Modified By: Roger Kumpf, Hewlett-Packard Company (roger_kumpf@hp.com) |
|
// Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
#include "CIMParamValueRep.h" |
#include "CIMParamValue.h" | #include "CIMParamValue.h" |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
|
|
# include "ArrayImpl.h" | # include "ArrayImpl.h" |
#undef PEGASUS_ARRAY_T | #undef PEGASUS_ARRAY_T |
| |
Boolean CIMParamValue::identical(const CIMConstParamValue& x) const |
|
|
CIMParamValue::CIMParamValue() |
|
: _rep(0) |
|
{ |
|
} |
|
|
|
CIMParamValue::CIMParamValue(const CIMParamValue& x) |
|
{ |
|
Inc(_rep = x._rep); |
|
} |
|
|
|
CIMParamValue::CIMParamValue(CIMParamValueRep* rep) |
|
: _rep(rep) |
|
{ |
|
} |
|
|
|
CIMParamValue& CIMParamValue::operator=(const CIMParamValue& x) |
|
{ |
|
if (x._rep != _rep) |
|
{ |
|
Dec(_rep); |
|
Inc(_rep = x._rep); |
|
} |
|
return *this; |
|
} |
|
|
|
CIMParamValue::CIMParamValue( |
|
String parameterName, |
|
CIMValue value, |
|
Boolean isTyped) |
|
{ |
|
_rep = new CIMParamValueRep(parameterName, value, isTyped); |
|
} |
|
|
|
CIMParamValue::~CIMParamValue() |
|
{ |
|
Dec(_rep); |
|
} |
|
|
|
String CIMParamValue::getParameterName() const |
|
{ |
|
_checkRep(); |
|
return _rep->getParameterName(); |
|
} |
|
|
|
CIMValue CIMParamValue::getValue() const |
|
{ |
|
_checkRep(); |
|
return _rep->getValue(); |
|
} |
|
|
|
Boolean CIMParamValue::isTyped() const |
|
{ |
|
_checkRep(); |
|
return _rep->isTyped(); |
|
} |
|
|
|
void CIMParamValue::setParameterName(String& parameterName) |
|
{ |
|
_checkRep(); |
|
_rep->setParameterName(parameterName); |
|
} |
|
|
|
void CIMParamValue::setValue(CIMValue& value) |
|
{ |
|
_checkRep(); |
|
_rep->setValue(value); |
|
} |
|
|
|
void CIMParamValue::setIsTyped(Boolean isTyped) |
|
{ |
|
_checkRep(); |
|
_rep->setIsTyped(isTyped); |
|
} |
|
|
|
Boolean CIMParamValue::isUninitialized() const |
|
{ |
|
return (_rep == 0)? true : false; |
|
} |
|
|
|
Boolean CIMParamValue::identical(const CIMParamValue& x) const |
{ | { |
x._checkRep(); | x._checkRep(); |
_checkRep(); | _checkRep(); |
return _rep->identical(x._rep); | return _rep->identical(x._rep); |
} | } |
| |
|
CIMParamValue CIMParamValue::clone() const |
|
{ |
|
return CIMParamValue(_rep->clone()); |
|
} |
|
|
|
void CIMParamValue::_checkRep() const |
|
{ |
|
if (!_rep) |
|
throw UninitializedObjectException(); |
|
} |
|
|
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |