version 1.30, 2002/05/15 12:28:21
|
version 1.31, 2002/05/15 23:14:21
|
|
|
out << x.getString(); | out << x.getString(); |
} | } |
| |
inline void _toString(Array<Sint8>& out, const CIMReference& x) |
inline void _toString(Array<Sint8>& out, const CIMObjectPath& x) |
{ | { |
out << x.toString(); | out << x.toString(); |
} | } |
|
|
set(x); | set(x); |
} | } |
| |
CIMValue::CIMValue(const CIMReference& x) |
CIMValue::CIMValue(const CIMObjectPath& x) |
{ | { |
_rep = new CIMValueRep(); | _rep = new CIMValueRep(); |
set(x); | set(x); |
|
|
set(x); | set(x); |
} | } |
| |
CIMValue::CIMValue(const Array<CIMReference>& x) |
CIMValue::CIMValue(const Array<CIMObjectPath>& x) |
{ | { |
_rep = new CIMValueRep(); | _rep = new CIMValueRep(); |
set(x); | set(x); |
|
|
| |
case CIMType::REFERENCE: | case CIMType::REFERENCE: |
_rep->_u._referenceValue = | _rep->_u._referenceValue = |
new CIMReference(*(x._rep->_u._referenceValue)); |
new CIMObjectPath(*(x._rep->_u._referenceValue)); |
break; | break; |
| |
// Should never get here. testing complete enum | // Should never get here. testing complete enum |
|
|
break; | break; |
| |
case CIMType::REFERENCE: | case CIMType::REFERENCE: |
set(Array<CIMReference>(arraySize)); |
set(Array<CIMObjectPath>(arraySize)); |
break; | break; |
default: | default: |
throw CIMValueInvalidType(); | throw CIMValueInvalidType(); |
|
|
break; | break; |
| |
case CIMType::REFERENCE: | case CIMType::REFERENCE: |
set(CIMReference()); |
set(CIMObjectPath()); |
break; | break; |
default: | default: |
throw CIMValueInvalidType(); | throw CIMValueInvalidType(); |
|
|
_rep->_isNull = false; | _rep->_isNull = false; |
} | } |
| |
void CIMValue::set(const CIMReference& x) |
void CIMValue::set(const CIMObjectPath& x) |
{ | { |
clear(); | clear(); |
_rep->_u._referenceValue = new CIMReference(x); |
_rep->_u._referenceValue = new CIMObjectPath(x); |
_rep->_type = CIMType::REFERENCE; | _rep->_type = CIMType::REFERENCE; |
_rep->_isNull = false; | _rep->_isNull = false; |
} | } |
|
|
_rep->_isNull = false; | _rep->_isNull = false; |
} | } |
| |
void CIMValue::set(const Array<CIMReference>& x) |
void CIMValue::set(const Array<CIMObjectPath>& x) |
{ | { |
clear(); | clear(); |
_Inc(_rep->_u._referenceArray = x._rep); | _Inc(_rep->_u._referenceArray = x._rep); |
|
|
x = *_rep->_u._dateTimeValue; | x = *_rep->_u._dateTimeValue; |
} | } |
| |
void CIMValue::get(CIMReference& x) const |
void CIMValue::get(CIMObjectPath& x) const |
{ | { |
if (_rep->_type != CIMType::REFERENCE || _rep->_isArray) | if (_rep->_type != CIMType::REFERENCE || _rep->_isArray) |
throw TypeMismatch(); | throw TypeMismatch(); |
|
|
x.set(_rep->_u._dateTimeArray); | x.set(_rep->_u._dateTimeArray); |
} | } |
| |
void CIMValue::get(Array<CIMReference>& x) const |
void CIMValue::get(Array<CIMObjectPath>& x) const |
{ | { |
if (_rep->_type != CIMType::REFERENCE || !_rep->_isArray) | if (_rep->_type != CIMType::REFERENCE || !_rep->_isArray) |
throw TypeMismatch(); | throw TypeMismatch(); |
|
|
Array<CIMDateTime>(y._rep->_u._dateTimeArray); | Array<CIMDateTime>(y._rep->_u._dateTimeArray); |
| |
case CIMType::REFERENCE: | case CIMType::REFERENCE: |
return Array<CIMReference>(x._rep->_u._referenceArray) == |
return Array<CIMObjectPath>(x._rep->_u._referenceArray) == |
Array<CIMReference>(y._rep->_u._referenceArray); |
Array<CIMObjectPath>(y._rep->_u._referenceArray); |
default: | default: |
throw CIMValueInvalidType(); | throw CIMValueInvalidType(); |
} | } |