📄 cimvalue.cpp
字号:
}void CIMValue::set(const CIMObjectPath& x){ _release(_rep); CIMValueType<CIMObjectPath>::set(_rep, x);}void CIMValue::set(const CIMObject& x){ if (x.isUninitialized()) { // Bug 3373, throw exception on uninitialized object. throw UninitializedObjectException(); } _release(_rep); CIMValueType<CIMObject>::set(_rep, x.clone());}#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORTvoid CIMValue::set(const CIMInstance& x){ if (x.isUninitialized()) { // Bug 3373, throw exception on uninitialized object. throw UninitializedObjectException(); } _release(_rep); CIMValueType<CIMInstance>::set(_rep, x.clone());}#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORTvoid CIMValue::set(const Array<Boolean>& x){ _release(_rep); CIMValueType<Boolean>::setArray(_rep, x);}void CIMValue::set(const Array<Uint8>& x){ _release(_rep); CIMValueType<Uint8>::setArray(_rep, x);}void CIMValue::set(const Array<Sint8>& x){ _release(_rep); CIMValueType<Sint8>::setArray(_rep, x);}void CIMValue::set(const Array<Uint16>& x){ _release(_rep); CIMValueType<Uint16>::setArray(_rep, x);}void CIMValue::set(const Array<Sint16>& x){ _release(_rep); CIMValueType<Sint16>::setArray(_rep, x);}void CIMValue::set(const Array<Uint32>& x){ _release(_rep); CIMValueType<Uint32>::setArray(_rep, x);}void CIMValue::set(const Array<Sint32>& x){ _release(_rep); CIMValueType<Sint32>::setArray(_rep, x);}void CIMValue::set(const Array<Uint64>& x){ _release(_rep); CIMValueType<Uint64>::setArray(_rep, x);}void CIMValue::set(const Array<Sint64>& x){ _release(_rep); CIMValueType<Sint64>::setArray(_rep, x);}void CIMValue::set(const Array<Real32>& x){ _release(_rep); CIMValueType<Real32>::setArray(_rep, x);}void CIMValue::set(const Array<Real64>& x){ _release(_rep); CIMValueType<Real64>::setArray(_rep, x);}void CIMValue::set(const Array<Char16>& x){ _release(_rep); CIMValueType<Char16>::setArray(_rep, x);}void CIMValue::set(const Array<String>& x){ _release(_rep); CIMValueType<String>::setArray(_rep, x);}void CIMValue::set(const Array<CIMDateTime>& x){ _release(_rep); CIMValueType<CIMDateTime>::setArray(_rep, x);}void CIMValue::set(const Array<CIMObjectPath>& x){ _release(_rep); CIMValueType<CIMObjectPath>::setArray(_rep, x);}void CIMValue::set(const Array<CIMObject>& a){ Array<CIMObject> tmp; for (Uint32 i = 0, n = a.size(); i < n; i++) { if (a[i].isUninitialized()) { // Bug 3373, throw exception on uninitialized object. throw UninitializedObjectException(); } tmp.append(a[i].clone()); } _release(_rep); CIMValueType<CIMObject>::setArray(_rep, tmp);}#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORTvoid CIMValue::set(const Array<CIMInstance>& a){ Array<CIMInstance> tmp; for (Uint32 i = 0, n = a.size(); i < n; i++) { if (a[i].isUninitialized()) { // Bug 3373, throw exception on uninitialized object. throw UninitializedObjectException(); } tmp.append(a[i].clone()); } _release(_rep); CIMValueType<CIMInstance>::setArray(_rep, tmp);}#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORTvoid CIMValue::get(Boolean& x) const{ if (_rep->type != CIMTYPE_BOOLEAN || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Boolean>::ref(_rep);}void CIMValue::get(Uint8& x) const{ if (_rep->type != CIMTYPE_UINT8 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint8>::ref(_rep);}void CIMValue::get(Sint8& x) const{ if (_rep->type != CIMTYPE_SINT8 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint8>::ref(_rep);}void CIMValue::get(Uint16& x) const{ if (_rep->type != CIMTYPE_UINT16 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint16>::ref(_rep);}void CIMValue::get(Sint16& x) const{ if (_rep->type != CIMTYPE_SINT16 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint16>::ref(_rep);}void CIMValue::get(Uint32& x) const{ if (_rep->type != CIMTYPE_UINT32 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint32>::ref(_rep);}void CIMValue::get(Sint32& x) const{ if (_rep->type != CIMTYPE_SINT32 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint32>::ref(_rep);}void CIMValue::get(Uint64& x) const{ if (_rep->type != CIMTYPE_UINT64 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint64>::ref(_rep);}void CIMValue::get(Sint64& x) const{ if (_rep->type != CIMTYPE_SINT64 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint64>::ref(_rep);}void CIMValue::get(Real32& x) const{ if (_rep->type != CIMTYPE_REAL32 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Real32>::ref(_rep);}void CIMValue::get(Real64& x) const{ if (_rep->type != CIMTYPE_REAL64 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Real64>::ref(_rep);}void CIMValue::get(Char16& x) const{ if (_rep->type != CIMTYPE_CHAR16 || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Char16>::ref(_rep);}void CIMValue::get(String& x) const{ if (_rep->type != CIMTYPE_STRING || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<String>::ref(_rep);}void CIMValue::get(CIMDateTime& x) const{ if (_rep->type != CIMTYPE_DATETIME || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<CIMDateTime>::ref(_rep);}void CIMValue::get(CIMObjectPath& x) const{ if (_rep->type != CIMTYPE_REFERENCE || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<CIMObjectPath>::ref(_rep);}void CIMValue::get(CIMObject& x) const{ if (_rep->type != CIMTYPE_OBJECT || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) // We have to clone our own unique copy since we are about to // return an object to the caller that he can modify; thereby, // changing the one we refer to as well. x = CIMValueType<CIMObject>::ref(_rep).clone();}#ifdef PEGASUS_EMBEDDED_INSTANCE_SUPPORTvoid CIMValue::get(CIMInstance& x) const{ if (_rep->type != CIMTYPE_INSTANCE || _rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) { // We have to clone our own unique copy since we are about to // return an object to the caller that he can modify; thereby, // changing the one we refer to as well. x = CIMValueType<CIMInstance>::ref(_rep).clone(); }}#endif // PEGASUS_EMBEDDED_INSTANCE_SUPPORTvoid CIMValue::get(Array<Boolean>& x) const{ if (_rep->type != CIMTYPE_BOOLEAN || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Boolean>::aref(_rep);}void CIMValue::get(Array<Uint8>& x) const{ if (_rep->type != CIMTYPE_UINT8 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint8>::aref(_rep);}void CIMValue::get(Array<Sint8>& x) const{ if (_rep->type != CIMTYPE_SINT8 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint8>::aref(_rep);}void CIMValue::get(Array<Uint16>& x) const{ if (_rep->type != CIMTYPE_UINT16 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint16>::aref(_rep);}void CIMValue::get(Array<Sint16>& x) const{ if (_rep->type != CIMTYPE_SINT16 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint16>::aref(_rep);}void CIMValue::get(Array<Uint32>& x) const{ if (_rep->type != CIMTYPE_UINT32 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint32>::aref(_rep);}void CIMValue::get(Array<Sint32>& x) const{ if (_rep->type != CIMTYPE_SINT32 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint32>::aref(_rep);}void CIMValue::get(Array<Uint64>& x) const{ if (_rep->type != CIMTYPE_UINT64 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Uint64>::aref(_rep);}void CIMValue::get(Array<Sint64>& x) const{ if (_rep->type != CIMTYPE_SINT64 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Sint64>::aref(_rep);}void CIMValue::get(Array<Real32>& x) const{ if (_rep->type != CIMTYPE_REAL32 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Real32>::aref(_rep);}void CIMValue::get(Array<Real64>& x) const{ if (_rep->type != CIMTYPE_REAL64 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Real64>::aref(_rep);}void CIMValue::get(Array<Char16>& x) const{ if (_rep->type != CIMTYPE_CHAR16 || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<Char16>::aref(_rep);}void CIMValue::get(Array<String>& x) const{ if (_rep->type != CIMTYPE_STRING || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<String>::aref(_rep);}void CIMValue::get(Array<CIMDateTime>& x) const{ if (_rep->type != CIMTYPE_DATETIME || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<CIMDateTime>::aref(_rep);}void CIMValue::get(Array<CIMObjectPath>& x) const{ if (_rep->type != CIMTYPE_REFERENCE || !_rep->isArray) throw TypeMismatchException(); if (!_rep->isNull) x = CIMValueType<CIMObjectPath>::aref(_rep);}void CIMValue::get(Array<CIMObject>& x) const{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -