Public Member Functions | Protected Attributes | List of all members
openfluid::tools::ProgressiveColumnFileReader Class Reference

#include <tools/ProgressiveColumnFileReader.hpp>

Inheritance diagram for openfluid::tools::ProgressiveColumnFileReader:
Inheritance graph
[legend]

Public Member Functions

 ProgressiveColumnFileReader (const std::string &FileName, const std::string &ColSeparators=" \t\r\n")
 
virtual ~ProgressiveColumnFileReader ()
 
bool getNextLine (std::string &Line)
 
bool getNextLine (std::vector< std::string > &Values)
 
void reset ()
 
std::string getFileName () const
 

Protected Attributes

std::string m_FileName
 

Detailed Description

Progressive reader for column text files

Constructor & Destructor Documentation

openfluid::tools::ProgressiveColumnFileReader::ProgressiveColumnFileReader ( const std::string &  FileName,
const std::string &  ColSeparators = " \t\r\n" 
)

Constructor

Parameters
[in]FileNamethe file to open
[in]ColSeparatorsa list of columns separators. Default value is " \t\r\n"
virtual openfluid::tools::ProgressiveColumnFileReader::~ProgressiveColumnFileReader ( )
inlinevirtual

Member Function Documentation

std::string openfluid::tools::ProgressiveColumnFileReader::getFileName ( ) const
inline

Returns the file name

Returns
the file name
bool openfluid::tools::ProgressiveColumnFileReader::getNextLine ( std::string &  Line)

Gets the next line of data in the file, as a single string

Parameters
[out]Linethe read line
Returns
true if the next line has been read, false otherwise
bool openfluid::tools::ProgressiveColumnFileReader::getNextLine ( std::vector< std::string > &  Values)

Gets the next line of data in the file, as a vector of strings

Parameters
[out]Valuesthe vector of read values
Returns
true if the next line has been read and splitted into a vector of strings, false otherwise
void openfluid::tools::ProgressiveColumnFileReader::reset ( )

Resets the internal iterator of the file

Member Data Documentation

std::string openfluid::tools::ProgressiveColumnFileReader::m_FileName
protected

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