Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::StringTable Class Reference

#include <StringTable.h>

Collaboration diagram for PLearn::StringTable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 StringTable (const string &filename)
 StringTable ()
int length () const
int width () const
stringoperator() (int i, int j)
TVec< stringoperator() (int i) const
void appendRow (const list< pair< string, string > > &row)
void declareFields (const list< pair< string, string > > &row)
string getFieldName (int i) const

Private Attributes

TMat< stringdata
vector< stringfieldnames
map< string, intrev_fn

Friends

ostream & operator<< (ostream &out, const StringTable &st)

Constructor & Destructor Documentation

PLearn::StringTable::StringTable const string filename  ) 
 

Definition at line 118 of file StringTable.cc.

References PLearn::countNonBlankLinesOfFile(), data, fieldnames, PLERROR, PLearn::removeblanks(), PLearn::TMat< string >::resize(), and PLearn::split().

PLearn::StringTable::StringTable  ) 
 

Definition at line 116 of file StringTable.cc.


Member Function Documentation

void PLearn::StringTable::appendRow const list< pair< string, string > > &  row  ) 
 

Definition at line 75 of file StringTable.cc.

References data, fieldnames, PLearn::TMat< string >::length(), PLearn::TMat< string >::resize(), rev_fn, PLearn::TMat< T >::subMatColumns(), and PLearn::TMat< string >::width().

void PLearn::StringTable::declareFields const list< pair< string, string > > &  row  ) 
 

Definition at line 102 of file StringTable.cc.

References data, fieldnames, PLearn::TMat< string >::length(), PLearn::TMat< string >::resize(), rev_fn, and PLearn::TMat< string >::width().

string PLearn::StringTable::getFieldName int  i  )  const [inline]
 

Definition at line 84 of file StringTable.h.

References fieldnames, and getFieldName().

Referenced by getFieldName(), and PLearn::StrTableVMatrix::StrTableVMatrix().

int PLearn::StringTable::length  )  const [inline]
 

Definition at line 75 of file StringTable.h.

References data, and PLearn::TMat< string >::length().

Referenced by PLearn::operator<<(), and PLearn::StrTableVMatrix::StrTableVMatrix().

TVec<string> PLearn::StringTable::operator() int  i  )  const [inline]
 

Definition at line 78 of file StringTable.h.

References data, and operator()().

string& PLearn::StringTable::operator() int  i,
int  j
[inline]
 

Definition at line 77 of file StringTable.h.

References data, and operator()().

Referenced by operator()().

int PLearn::StringTable::width  )  const [inline]
 

Definition at line 76 of file StringTable.h.

References data, and PLearn::TMat< string >::width().

Referenced by PLearn::operator<<(), and PLearn::StrTableVMatrix::StrTableVMatrix().


Friends And Related Function Documentation

ostream& operator<< ostream &  out,
const StringTable st
[friend]
 

Definition at line 42 of file StringTable.cc.


Member Data Documentation

TMat<string> PLearn::StringTable::data [private]
 

Definition at line 51 of file StringTable.h.

Referenced by appendRow(), declareFields(), length(), operator()(), PLearn::operator<<(), StringTable(), and width().

vector<string> PLearn::StringTable::fieldnames [private]
 

Definition at line 52 of file StringTable.h.

Referenced by appendRow(), declareFields(), getFieldName(), PLearn::operator<<(), and StringTable().

map<string, int> PLearn::StringTable::rev_fn [private]
 

Definition at line 53 of file StringTable.h.

Referenced by appendRow(), and declareFields().


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:22:45 2004 for PLearn by doxygen 1.3.7