NeoPZ
Public Member Functions | Protected Attributes | List of all members
CSVTableColumn< T > Class Template Reference

#include <csvtable.h>

Public Member Functions

 CSVTableColumn (const string &header)
 
const string & getHeader () const
 
void setHeader (const string &h)
 
bool isHeader (const string &h) const
 
unsigned nRows () const
 
unsigned addRows (unsigned nrows)
 
T & operator[] (unsigned i)
 
const T & operator[] (unsigned i) const
 

Protected Attributes

string header
 
vector< T > data
 

Detailed Description

template<class T>
class CSVTableColumn< T >

Template class to create CSVTable columns where the cell values are of type T.

Definition at line 17 of file csvtable.h.

Constructor & Destructor Documentation

◆ CSVTableColumn()

template<class T>
CSVTableColumn< T >::CSVTableColumn ( const string &  header)
inline

Definition at line 21 of file csvtable.h.

Member Function Documentation

◆ addRows()

template<class T>
unsigned CSVTableColumn< T >::addRows ( unsigned  nrows)
inline

Add nrows rows to the column. Return the total number of rows.

Definition at line 53 of file csvtable.h.

Referenced by CSVTable< Tvar >::addRows(), and CSVTable< Tvar >::read().

◆ getHeader()

template<class T>
const string& CSVTableColumn< T >::getHeader ( ) const
inline

Definition at line 27 of file csvtable.h.

◆ isHeader()

template<class T>
bool CSVTableColumn< T >::isHeader ( const string &  h) const
inline

Definition at line 39 of file csvtable.h.

◆ nRows()

template<class T>
unsigned CSVTableColumn< T >::nRows ( ) const
inline

Definition at line 45 of file csvtable.h.

◆ operator[]() [1/2]

template<class T>
T& CSVTableColumn< T >::operator[] ( unsigned  i)
inline

Returns a reference to the element.

Definition at line 60 of file csvtable.h.

◆ operator[]() [2/2]

template<class T>
const T& CSVTableColumn< T >::operator[] ( unsigned  i) const
inline

Returns a constant reference to the element.

Definition at line 71 of file csvtable.h.

◆ setHeader()

template<class T>
void CSVTableColumn< T >::setHeader ( const string &  h)
inline

Definition at line 33 of file csvtable.h.

References h.

Member Data Documentation

◆ data

template<class T>
vector<T> CSVTableColumn< T >::data
protected

Definition at line 84 of file csvtable.h.

◆ header

template<class T>
string CSVTableColumn< T >::header
protected

Definition at line 83 of file csvtable.h.


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