Logo Search packages:      
Sourcecode: jaula version File versions

void JAULA::Value_Number::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 66 of file jaula_value_number.cc.

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

      Value_Number const *pOrg = dynamic_cast<Value_Number 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_Number::set(Value const &)");
      throw ex;

Generated by  Doxygen 1.6.0   Back to index