void Property::set(const UserObject& object, const Value& value) const { // Check if the property is writable if (!writable(object)) PONDER_ERROR(ForbiddenWrite(name())); // Here we don't call setValue directly, we rather let the user object do it // and add any processing needed for proper propagation of the modification object.set(*this, value); }
//------------------------------------------------------------------------------------------------- void DictionaryProperty::set(const UserObject& object, const camp::Value& key, const Value& value) const { // Check if the property is writable if (!writable(object)) { m_setted_nonwritable_signal(object, *this, key, value); CAMP_ERROR(ForbiddenWrite(name())); } // Signal before setting the value so slots can throw an exception to prevent setting. m_setted_signal(object, *this, key, value); return setElement(object, key, value); }