Logo Search packages:      
Sourcecode: jaula version File versions

void JAULA::Value_String::set ( Value const &  origin  )  throw (Bad_Data_Type) [virtual]

Copies the contents of one instance into another.

origin Reference to the value to be copied.
Bad_Data_Type This exception is launched in case that origin and destination value types are different.

Reimplemented from JAULA::Value.

Definition at line 75 of file jaula_value_string.cc.

References JAULA::Exception::addOrigin(), data_, getData(), and JAULA::Value::set().

      Value_String const *pOrg = dynamic_cast<Value_String const *>(&origin);
      if (!pOrg)
        throw Bad_Data_Type("Origin and Destination types do not match", "narrowing origin to destination type");
      data_ = pOrg->getData();
    catch(Bad_Data_Type &ex)
      ex.addOrigin("Value_String::set(Value const &)");
      throw ex;

Generated by  Doxygen 1.6.0   Back to index