openfluid::tools Namespace Reference


Classes

class  ColumnTextParser
class  DataSourcesFile
class  DistributeInterpolate
class  DateTimeSerie

Functions

template<typename T >
bool ConvertString (const std::string &StrToConvert, T *Converted)
template<typename T >
bool ConvertValue (const T ValueToConvert, std::string *StrConverted)
void TokenizeString (const std::string &StrToTokenize, std::vector< std::string > &Tokens, const std::string &Delimiters)
bool IsCloseEnough (double A, double B, double Epsilon=0.00001)
bool IsVeryClose (double A, double B, double Epsilon=0.00001)

Detailed Description

Available tools for data processing


Function Documentation

template<typename T >
bool openfluid::tools::ConvertString ( const std::string &  StrToConvert,
T *  Converted 
) [inline]

Template function for string to other type conversion

Parameters:
[in] StrToConvert the string to convert
[out] Converted the result of the conversion
Returns:
true if the conversion is correct

template<typename T >
bool openfluid::tools::ConvertValue ( const T  ValueToConvert,
std::string *  StrConverted 
) [inline]

Template function for value to string conversion

Parameters:
[in] ValueToConvert the value to convert
[out] StrConverted the result of the conversion
Returns:
true if the conversion is correct

bool openfluid::tools::IsCloseEnough ( double  A,
double  B,
double  Epsilon = 0.00001 
) [inline]

Function for testing equality between two double precision floats, using the "close enough" method.

Parameters:
[in] A the firts term of the equality
[in] B the firts term of the equality
[in] Epsilon the comparison tolerance factor
See also:
http://www.ensta.fr/~diam/c++/online/c++-faq-lite/newbie.html#faq-29.17

http://www.boost.org/doc/libs/1_38_0/libs/test/doc/html/utf/testing-tools/floating_point_comparison.html

bool openfluid::tools::IsVeryClose ( double  A,
double  B,
double  Epsilon = 0.00001 
) [inline]

Function for testing equality between two double precision floats, using the "very close" method.

Parameters:
[in] A the firts term of the equality
[in] B the firts term of the equality
[in] Epsilon the comparison tolerance factor
See also:
http://www.ensta.fr/~diam/c++/online/c++-faq-lite/newbie.html#faq-29.17

http://www.boost.org/doc/libs/1_38_0/libs/test/doc/html/utf/testing-tools/floating_point_comparison.html

void openfluid::tools::TokenizeString ( const std::string &  StrToTokenize,
std::vector< std::string > &  Tokens,
const std::string &  Delimiters 
)

Function for tokenizing string into a vector of tokens

Parameters:
[in] StrToTokenize the string to tokenize
[out] Tokens the resulting tokens
[in] Delimiters the string delimiter


Generated using Doxygen 1.5.8
Creative Commons License Creative Commons By-NC-ND license