oILAB
Loading...
Searching...
No Matches
oILAB::TextFileParser Class Reference

#include <TextFileParser.h>

+ Inheritance diagram for oILAB::TextFileParser:

Public Member Functions

 TextFileParser (const std::string &_fileName)
 
std::string readString (const std::string &key, const bool &verbose=false)
 
std::vector< std::pair< std::string, std::string > > readStringVector (const std::string &key)
 
template<typename Scalar >
Scalar readScalar (const std::string &key, const bool &verbose=false)
 
template<typename Scalar >
std::set< Scalar > readSet (const std::string &key, const bool &verbose=false)
 
template<typename Scalar >
std::vector< Scalar > readArray (const std::string &key, const bool &verbose=false)
 
template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > readMatrix (const std::string &key, const size_t &rows, const size_t &cols, const bool &verbose=false)
 
template<typename Scalar , int rows, int cols>
Eigen::Matrix< Scalar, rows, cols > readMatrix (const std::string &key, const bool &verbose=false)
 
template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > readMatrixCols (const std::string &key, const size_t &cols, const bool &verbose=false)
 
template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > readMatrixRows (const std::string &key, const size_t &rows, const bool &verbose=false)
 

Static Public Member Functions

static std::string removeSpaces (std::string key)
 

Data Fields

const std::string fileName
 

Private Types

template<typename Scalar >
using EigenMapType = Eigen::Map< const Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic >, 0, Eigen::Stride< Eigen::Dynamic, Eigen::Dynamic > >
 

Private Member Functions

std::vector< std::pair< std::string, std::string > > readKey (const std::string &key)
 

Detailed Description

Member Typedef Documentation

◆ EigenMapType

template<typename Scalar >
using oILAB::TextFileParser::EigenMapType = Eigen::Map<const Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic>, 0, Eigen::Stride<Eigen::Dynamic,Eigen::Dynamic> >
private

Definition at line 128 of file TextFileParser.h.

Constructor & Destructor Documentation

◆ TextFileParser()

oILAB::TextFileParser::TextFileParser ( const std::string &  _fileName)
inline

Definition at line 253 of file TextFileParser.h.

Member Function Documentation

◆ readArray()

template<typename Scalar >
std::vector< Scalar > oILAB::TextFileParser::readArray ( const std::string &  key,
const bool verbose = false 
)
inline

Definition at line 333 of file TextFileParser.h.

◆ readKey()

std::vector< std::pair< std::string, std::string > > oILAB::TextFileParser::readKey ( const std::string &  key)
inlineprivate

Definition at line 191 of file TextFileParser.h.

◆ readMatrix() [1/2]

template<typename Scalar , int rows, int cols>
Eigen::Matrix< Scalar, rows, cols > oILAB::TextFileParser::readMatrix ( const std::string &  key,
const bool &  verbose = false 
)
inline

Definition at line 447 of file TextFileParser.h.

◆ readMatrix() [2/2]

template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > oILAB::TextFileParser::readMatrix ( const std::string &  key,
const size_t &  rows,
const size_t &  cols,
const bool &  verbose = false 
)
inline

Definition at line 428 of file TextFileParser.h.

◆ readMatrixCols()

template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > oILAB::TextFileParser::readMatrixCols ( const std::string &  key,
const size_t cols,
const bool verbose = false 
)
inline

Definition at line 454 of file TextFileParser.h.

◆ readMatrixRows()

template<typename Scalar >
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > oILAB::TextFileParser::readMatrixRows ( const std::string &  key,
const size_t rows,
const bool verbose = false 
)
inline

Definition at line 473 of file TextFileParser.h.

◆ readScalar()

template<typename Scalar >
Scalar oILAB::TextFileParser::readScalar ( const std::string &  key,
const bool verbose = false 
)
inline

Definition at line 299 of file TextFileParser.h.

◆ readSet()

template<typename Scalar >
std::set< Scalar > oILAB::TextFileParser::readSet ( const std::string &  key,
const bool verbose = false 
)
inline

Definition at line 310 of file TextFileParser.h.

◆ readString()

std::string oILAB::TextFileParser::readString ( const std::string &  key,
const bool verbose = false 
)
inline

Definition at line 284 of file TextFileParser.h.

◆ readStringVector()

std::vector< std::pair< std::string, std::string > > oILAB::TextFileParser::readStringVector ( const std::string &  key)
inline

Definition at line 292 of file TextFileParser.h.

◆ removeSpaces()

static std::string oILAB::TextFileParser::removeSpaces ( std::string  key)
inlinestatic

Definition at line 277 of file TextFileParser.h.

Field Documentation

◆ fileName

const std::string oILAB::TextFileParser::fileName

Definition at line 250 of file TextFileParser.h.


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