Esempio n. 1
0
void CIMPropertyRep::setValue(const CIMValue& value)
{
    // CIMType of value is immutable:

    if (!value.typeCompatible(_value))
	throw TypeMismatchException();

    if (_arraySize && _arraySize != value.getArraySize())
	throw TypeMismatchException();

    _value = value;
}
Esempio n. 2
0
void CIMPropertyRep::setValue(const CIMValue& value)
{
    // CIMType of value is immutable:

    if (!value.typeCompatible(_value))
        throw TypeMismatchException();

    if (_arraySize && _arraySize != value.getArraySize())
        throw TypeMismatchException();

    // A CIM Property may not be of reference array type
    if (value.isArray() && (value.getType() == CIMTYPE_REFERENCE))
    {
        throw TypeMismatchException();
    }

    _value = value;
}