Logo Search packages:      
Sourcecode: condor version File versions  Download package

void Literal::GetValue ( Value v  )  const

Deconstructor to get the encapsulated value

Parameters:
v The value encapsulated by the literal

Definition at line 471 of file literals.cpp.

References Value::CopyFrom(), Value::IsIntegerValue(), Value::IsRealValue(), Value::NO_FACTOR, Value::ScaleFactor, and Value::SetRealValue().

{
      int         i;
      double      r;

      val.CopyFrom( value );

      // if integer or real, multiply by the factor
      if (val.IsIntegerValue(i)) {
            if( factor != Value::NO_FACTOR ) {
                  val.SetRealValue( ((double)i)*Value::ScaleFactor[factor] );
            }
      } else if (val.IsRealValue(r)) {
            if( factor != Value::NO_FACTOR ) {
                  val.SetRealValue (r*Value::ScaleFactor[factor]);
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index