OpenFCST: The open-source Fuel Cell Simulation Toolbox
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Functions
fcst_utilities.h File Reference
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <cctype>
#include <boost/lexical_cast.hpp>
#include <fstream>
#include <base/utilities.h>
#include <base/exceptions.h>
#include <base/parameter_handler.h>
Include dependency graph for fcst_utilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  FcstUtilities
 

Functions

 FcstUtilities::DeclException1 (ExcWrongString, std::string,<< "Can't convert the string "<< arg1<< " to the desired Number type")
 Exception shown when a particular string can't be converted to Number type.
 
template<typename NumType >
NumType FcstUtilities::string_to_number (const std::string &)
 Function to convert a std::string into Number template.
 
template<typename NumType >
std::vector< NumType > FcstUtilities::string_to_number (const std::vector< std::string > &)
 Function to convert a std::vector< std::string > into std::vector < Number template >.
 
template<typename KeyType , typename ValueType >
std::map< KeyType, ValueType > FcstUtilities::string_to_map (const std::vector< std::string > &)
 Function to convert a std::vector< std::string > into std::map< KeyType, ValueType >.
 
template<typename KeyType , typename ValueType >
std::map< KeyType, ValueType > FcstUtilities::string_to_map (const std::string &name)
 This function is the same as the previous one.
 
template<>
std::map< unsigned int,
std::string > 
FcstUtilities::string_to_map (const std::string &name)
 This function is a particular reimplementation of the previous one.
 
template<typename KeyType , typename ValueType >
std::map< KeyType, std::vector
< ValueType > > 
FcstUtilities::split_mapvalue_list (const std::map< KeyType, std::string > &, const char delimiter= ';')
 This function takes a std::map<KeyType, std::string>, and std::string contains text separated by a delimiter.
 
void FcstUtilities::print_parameter_file_XML (ParameterHandler &param)
 This function prepares an XML file with ALL your data inside.
 
std::string FcstUtilities::find_fcst_root ()
 This function returns the address of the fcst root directory.
 
void FcstUtilities::run_python (std::string script_name, std::string arg)
 This function runs external python scripts.
 
template<typename NumType >
std::string FcstUtilities::number_to_string (const NumType &num)
 Function for casting from double to string.