code::DynDimVal Class Reference

Inheritance diagram for code::DynDimVal:

code::W2Unit List of all members.

Detailed Description

This is used to backward support dimension left over.

Out dated Class. Recomended not too use it in the future. Use W2Unit whenever you need to do unit converion.

Author:
Thomas E. Vaughan (original)
Author
lakshman
Date
2009/06/02 20:17:38


Public Member Functions

 DynDimVal ()
 DynDimVal (double value, const std::string &)
 Build an DynDimVal object given a value along with its unit name.
double num (const std::string &unitStr) const
 Return double value with passed in unit string.
std::string str () const
 Return unit string.
double value (const std::string &units) const
 Return this W2Unit's value in "units" units.
bool value (const std::string &units, double &setme) const
 Convert the current W2Unit's value into other units.
double value () const
 Return this W2Unit's value in its native units.
std::string unit () const
 Return this W2Unit's units.

Static Public Member Functions

static bool getConverter (const std::string &from, const std::string &to, UnitConverter &setme)
 Get a UnitConverter that converts from one unit to another.
static double value (const UnitConverter &uc, double d)
 Convert a value using a UnitConverter.
static double value (const std::string &from, const std::string &to, double fromValue)
 Convert a value from one unit to another.
static bool isValidUnit (const std::string &unit)
static bool isCompatibleUnit (const std::string &from, const std::string &to)
static bool convert (const std::string &from, const std::string &to, double fromValue, double &setmeToValue)
 Convert a value from one unit to another.

Static Public Attributes

static const std::string Dimensionless
static const std::string Kilometers
static const std::string MetersPerSecond
static const std::string Degrees
static const std::string Seconds


Constructor & Destructor Documentation

code::DynDimVal::DynDimVal (  ) 

code::DynDimVal::DynDimVal ( double  value,
const std::string &   
)

Build an DynDimVal object given a value along with its unit name.


Member Function Documentation

static bool code::W2Unit::convert ( const std::string &  from,
const std::string &  to,
double  fromValue,
double &  setmeToValue 
) [static, inherited]

Convert a value from one unit to another.

Like value(), but returns a success flag to let callers know whether or not the conversion was successful.

static bool code::W2Unit::getConverter ( const std::string &  from,
const std::string &  to,
UnitConverter setme 
) [static, inherited]

Get a UnitConverter that converts from one unit to another.

static bool code::W2Unit::isCompatibleUnit ( const std::string &  from,
const std::string &  to 
) [static, inherited]

static bool code::W2Unit::isValidUnit ( const std::string &  unit  )  [static, inherited]

double code::DynDimVal::num ( const std::string &  unitStr  )  const

Return double value with passed in unit string.

std::string code::DynDimVal::str (  )  const

Return unit string.

std::string code::W2Unit::unit (  )  const [inline, inherited]

Return this W2Unit's units.

double code::W2Unit::value (  )  const [inline, inherited]

Return this W2Unit's value in its native units.

bool code::W2Unit::value ( const std::string &  units,
double &  setme 
) const [inline, inherited]

Convert the current W2Unit's value into other units.

Like value(string), but returns a success flag to let callers know whether or not the conversion was successful.

double code::W2Unit::value ( const std::string &  units  )  const [inline, inherited]

Return this W2Unit's value in "units" units.

See also:
value(string,double&);

static double code::W2Unit::value ( const std::string &  from,
const std::string &  to,
double  fromValue 
) [static, inherited]

Convert a value from one unit to another.

See also:
convert()

static double code::W2Unit::value ( const UnitConverter uc,
double  d 
) [inline, static, inherited]

Convert a value using a UnitConverter.


Member Data Documentation

const std::string code::W2Unit::Degrees [static, inherited]

const std::string code::W2Unit::Dimensionless [static, inherited]

const std::string code::W2Unit::Kilometers [static, inherited]

const std::string code::W2Unit::MetersPerSecond [static, inherited]

const std::string code::W2Unit::Seconds [static, inherited]


Generated on Fri May 4 13:40:12 2012 for WDSS-IIw2 by  doxygen 1.4.7