openfluid::tools Namespace Reference

Classes

class  ColumnTextParser
class  DataSourcesFile
class  DistributeInterpolate
struct  TimePair
struct  IndexedSerie
class  DateTimeSerie

Typedefs

typedef std::map< int,
std::string > 
IDDataSourcesMap
typedef std::map< int,
DateTimeSerie * > 
DTSeriesMap
typedef std::map< int,
DateTimeSerie * > 
UnitsDTSeriesMap
typedef std::map< int,
IndexedSerie * > 
IndexedSeriesMap
typedef std::map< int,
IndexedSerie * > 
UnitsIndexedSeriesMap

Enumerations

enum  SeriePreprocess { SERIEPREPCS_NONE, SERIEPREPCS_CUMULATE }

Functions

template<typename T >
bool ConvertString (const std::string &StrToConvert, T *Converted)
template<typename T >
bool ConvertValue (const T ValueToConvert, std::string *StrConverted)
void DLLEXPORT 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)
bool DLLEXPORT WildcardMatching (const std::string Pattern, const std::string Str)
std::vector< std::string >
DLLEXPORT 
GetFilesByExt (const std::string DirToExplore, const std::string Ext, bool WithPath=false, bool ExtIncludeDot=false)
std::vector< std::string >
DLLEXPORT 
SplitString (const std::string StrToSplit, const std::string Separators, bool ReturnsEmpty=false)
bool DLLEXPORT EmptyDirectoryRecursively (const std::string DirPath)
std::string DLLEXPORT ReplaceEmptyString (std::string SourceStr, std::string ReplaceStr)
bool DLLEXPORT IsVectorNamedVariable (std::string Name)
std::string DLLEXPORT GetVectorNamedVariableName (std::string Name)
std::string DLLEXPORT RemoveTrailingSlashes (std::string Str)
void DLLEXPORT printSTDOUT (std::vector< std::string > Strings, std::string Sep)
openfluid::core::DateTime DLLEXPORT GenerateDateTimeFromStep (openfluid::core::DateTime DT0, openfluid::core::TimeStep_t TS, unsigned int CurrentStep)
void DLLEXPORT CopyDirectoryRecursively (const std::string SourcePath, const std::string IntoPath, const bool DontCopyDotDirs=false)
std::vector< std::string >
DLLEXPORT 
GetFileLocationsUsingPATHEnvVar (const std::string Filename)

Typedef Documentation

typedef std::map<int,std::string> openfluid::tools::IDDataSourcesMap

Enumeration Type Documentation

Enumerator:
SERIEPREPCS_NONE 
SERIEPREPCS_CUMULATE 

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
void DLLEXPORT openfluid::tools::CopyDirectoryRecursively ( const std::string  SourcePath,
const std::string  IntoPath,
const bool  DontCopyDotDirs = false 
)
bool DLLEXPORT openfluid::tools::EmptyDirectoryRecursively ( const std::string  DirPath  ) 
openfluid::core::DateTime DLLEXPORT openfluid::tools::GenerateDateTimeFromStep ( openfluid::core::DateTime  DT0,
openfluid::core::TimeStep_t  TS,
unsigned int  CurrentStep 
)
std::vector<std::string> DLLEXPORT openfluid::tools::GetFileLocationsUsingPATHEnvVar ( const std::string  Filename  ) 
std::vector<std::string> DLLEXPORT openfluid::tools::GetFilesByExt ( const std::string  DirToExplore,
const std::string  Ext,
bool  WithPath = false,
bool  ExtIncludeDot = false 
)

Get list of files with specified extension contained in the specified dir

Parameters:
[in] DirToExplore the directory to explore
[in] Ext the file extension
[in] WithPath return full path with file name if true, file name only otherwise
[in] ExtIncludeDot if true, the given extension through Ext parameter is suffixed by a dot
std::string DLLEXPORT openfluid::tools::GetVectorNamedVariableName ( std::string  Name  ) 
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 DLLEXPORT openfluid::tools::IsVectorNamedVariable ( std::string  Name  ) 
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 DLLEXPORT openfluid::tools::printSTDOUT ( std::vector< std::string >  Strings,
std::string  Sep 
)
std::string DLLEXPORT openfluid::tools::RemoveTrailingSlashes ( std::string  Str  ) 
std::string DLLEXPORT openfluid::tools::ReplaceEmptyString ( std::string  SourceStr,
std::string  ReplaceStr 
)
std::vector<std::string> DLLEXPORT openfluid::tools::SplitString ( const std::string  StrToSplit,
const std::string  Separators,
bool  ReturnsEmpty = false 
)

Splits the passed string into a std::string array, split using the given SepString

Parameters:
[in] StrToSplit the string to split
[in] Separators the string of separators used to split the string
[in] ReturnsEmpty if true, the empty strings are returned
Returns:
a vector of strings
void DLLEXPORT 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
bool DLLEXPORT openfluid::tools::WildcardMatching ( const std::string  Pattern,
const std::string  Str 
)

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