Logo Search packages:      
Sourcecode: jaula version File versions

void JAULA::Value_Object::insertItem ( std::string const &  name,
Value const &  item 
) throw (Name_Duplicated)

Inserts one item to the object.

name Name for the property to insert
item Item value to be inserted
Name_Duplicated This exception is thrown in case the object already has a property with the same name as the one to insert.
Inserts a deep copy of the item value at the specified name fot the object.

Definition at line 114 of file jaula_value_object.cc.

References data_, and JAULA::Value::duplicate().

    std::pair<dataType::iterator, bool> insSt = data_.insert(dataType::value_type(name, duplicate(item)));
    if (!insSt.second)
      throw Name_Duplicated(name, "inserting a new object property"
        , "Value_Object::insertItem(std::string const &, Value const &)");

Generated by  Doxygen 1.6.0   Back to index