NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | List of all members
niftk::CSVRow Class Reference

Comma separated value (CSV) row class used to parse rows from an input stream and split them into a vector of strin elements. More...

Public Member Functions

 CSVRow ()
 
 ~CSVRow ()
 
std::string const & operator[] (std::vcl_size_t index) const
 
std::vcl_size_t Size () const
 
void ReadNextRow (std::istream &inStream)
 

Detailed Description

Comma separated value (CSV) row class used to parse rows from an input stream and split them into a vector of strin elements.

Example usage:

int main()
{
std::ifstream fin("fileDataInput.csv");
while( fin >> row )
{
std::cout << row << std::endl;
}
}

Constructor & Destructor Documentation

niftk::CSVRow::CSVRow ( )

Construct CSVRow by allocating the vector

niftk::CSVRow::~CSVRow ( )

Destructor

Member Function Documentation

std::string const& niftk::CSVRow::operator[] ( std::vcl_size_t  index) const
inline

Get an element of the row.

void niftk::CSVRow::ReadNextRow ( std::istream &  inStream)

Read the next row in the input stream

std::vcl_size_t niftk::CSVRow::Size ( ) const
inline

Return the size of the row (number of elements).


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