BayesOpt
bayesopt::utils::FileParser Class Reference
+ Collaboration diagram for bayesopt::utils::FileParser:

Public Member Functions

 FileParser (std::string filename, int prec=10)
 
 FileParser (int prec=10)
 
void open (bool readMode)
 
void openOutput ()
 
void openInput ()
 
void close ()
 
bool isReading ()
 
bool isWriting ()
 
void setPrecision (int prec)
 
bool fileExists ()
 
void write (std::string name, std::string value)
 
void read (std::string name, std::string &value)
 
std::string read (std::string name)
 
void write (std::string name, const std::vector< std::string > &arr, const std::vector< int > &dims)
 
void read (std::string name, std::vector< std::string > &arr, std::vector< int > &dims)
 
template<typename T >
void write (std::string name, T value)
 
template<typename T >
void read (std::string name, T &value)
 
template<typename T >
void readOrWrite (std::string name, T &value)
 
void write_chars (std::string name, char *value)
 
void read_chars (std::string name, char *value)
 
void readOrWrite (std::string name, char *value)
 
void write_ublas (std::string name, boost::numeric::ublas::vector< double > &values)
 
void read_ublas (std::string name, boost::numeric::ublas::vector< double > &values)
 
void readOrWrite (std::string name, boost::numeric::ublas::vector< double > &values)
 
void write_vecOfvec (std::string name, std::vector< boost::numeric::ublas::vector< double > > &values)
 
void read_vecOfvec (std::string name, std::vector< boost::numeric::ublas::vector< double > > &values)
 
void readOrWrite (std::string name, std::vector< boost::numeric::ublas::vector< double > > &values)
 
void write_double_array (std::string name, double values[], size_t length)
 
void read_double_array (std::string name, double values[], size_t length)
 
void readOrWrite (std::string name, double values[], size_t length)
 
template<typename T >
std::string to_string (T value)
 
template<typename T >
to_value (std::string str)
 

Private Member Functions

bool movePointer (std::string name, std::string &content)
 
bool startsWith (std::string all, std::string sub)
 
void parseArray (std::string contents, std::vector< std::string > &arr, std::vector< int > &dims)
 

Private Attributes

std::string filename
 
std::ofstream output
 
std::ifstream input
 
std::string currentLine
 
int precision
 

Detailed Description

Definition at line 44 of file fileparser.hpp.


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