FEDEM Solver  R8.0
Source code of the dynamics solver
Classes | Public Member Functions | Private Types | Private Attributes | Friends | List of all members
FFaUnitCalculator Class Reference

#include <FFaUnitCalculator.H>

Classes

struct  SingleUnit
 

Public Member Functions

 FFaUnitCalculator (const char *n=NULL)
 
bool operator== (const FFaUnitCalculator &cal) const
 
bool isValid () const
 
const std::string & getName () const
 
const std::string & getOrigUnits () const
 
const std::string & getConvUnits () const
 
template<class T >
bool convert (T &value, const std::string &aName) const
 
bool convert (double &value, const std::string &aName, int prec) const
 Conversion with rounding to prec significant digits. More...
 
template<class T >
bool inverse (T &value, const std::string &aName) const
 Reversed conversion. More...
 
double convFactor (const std::string &aName) const
 
std::string origUnitName (const std::string &aName) const
 
std::string convUnitName (const std::string &aName) const
 
void addConversion (const std::string &propName, double sf, const std::string &origUnit="", const std::string &convUnit="")
 

Private Types

typedef std::map< std::string, SingleUnitSingleUnitMap
 
typedef SingleUnitMap::const_iterator SingleUnitMapIter
 

Private Attributes

std::string name
 
std::string origGroup
 
std::string convGroup
 
SingleUnitMap myConvFactors
 

Friends

std::ostream & operator<< (std::ostream &os, const FFaUnitCalculator &field)
 
std::istream & operator>> (std::istream &is, FFaUnitCalculator &field)
 

Member Typedef Documentation

◆ SingleUnitMap

typedef std::map<std::string,SingleUnit> FFaUnitCalculator::SingleUnitMap
private

◆ SingleUnitMapIter

typedef SingleUnitMap::const_iterator FFaUnitCalculator::SingleUnitMapIter
private

Constructor & Destructor Documentation

◆ FFaUnitCalculator()

FFaUnitCalculator::FFaUnitCalculator ( const char *  n = NULL)
inline

Member Function Documentation

◆ addConversion()

void FFaUnitCalculator::addConversion ( const std::string &  propName,
double  sf,
const std::string &  origUnit = "",
const std::string &  convUnit = "" 
)

◆ convert() [1/2]

bool FFaUnitCalculator::convert ( double &  value,
const std::string &  aName,
int  prec 
) const

Conversion with rounding to prec significant digits.

◆ convert() [2/2]

template<class T >
bool FFaUnitCalculator::convert ( T &  value,
const std::string &  aName 
) const
inline

◆ convFactor()

double FFaUnitCalculator::convFactor ( const std::string &  aName) const
inline

◆ convUnitName()

std::string FFaUnitCalculator::convUnitName ( const std::string &  aName) const
inline

◆ getConvUnits()

const std::string& FFaUnitCalculator::getConvUnits ( ) const
inline

◆ getName()

const std::string& FFaUnitCalculator::getName ( ) const
inline

◆ getOrigUnits()

const std::string& FFaUnitCalculator::getOrigUnits ( ) const
inline

◆ inverse()

template<class T >
bool FFaUnitCalculator::inverse ( T &  value,
const std::string &  aName 
) const
inline

Reversed conversion.

◆ isValid()

bool FFaUnitCalculator::isValid ( ) const
inline

◆ operator==()

bool FFaUnitCalculator::operator== ( const FFaUnitCalculator cal) const

◆ origUnitName()

std::string FFaUnitCalculator::origUnitName ( const std::string &  aName) const
inline

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const FFaUnitCalculator field 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  is,
FFaUnitCalculator field 
)
friend

Member Data Documentation

◆ convGroup

std::string FFaUnitCalculator::convGroup
private

◆ myConvFactors

SingleUnitMap FFaUnitCalculator::myConvFactors
private

◆ name

std::string FFaUnitCalculator::name
private

◆ origGroup

std::string FFaUnitCalculator::origGroup
private

The documentation for this class was generated from the following files: