libRDataFrame  0.815
A library with R style datatypes and associated utilities
 All Classes Files Functions Variables Pages
Public Member Functions | Protected Attributes | List of all members
utilCSV Class Reference

Public Member Functions

 utilCSV ()
 Contains the data structures receiving the imported data from the CSV file (or going to be written to a CSV file). More...
 
 utilCSV (std::string frCSV, bool header, int rtoline=0)
 
int getNcols ()
 
int getNrows ()
 
void setNcols ()
 
void setNrows ()
 
void setColNames (std::vector< std::string > cnames)
 
std::vector< std::string > getColNames ()
 
std::vector< std::string > getColTypes ()
 
std::vector< std::string > getCVS ()
 
std::vector< std::vector
< std::string > > 
getStrDataStruct ()
 
std::vector< std::string > readCSV (std::string iFileN)
 
std::vector< std::string > parseLine (std::string lineToParse)
 
std::vector< std::vector
< std::string > > 
buildDataStruct (std::vector< std::string > csvToParse)
 
void writeCSV (std::vector< std::vector< std::string > > strDataStruct, std::string oFName)
 
void displayColNames ()
 
void displayInternCSV ()
 
void displayStrDataStruct ()
 
std::string toString ()
 

Protected Attributes

std::string fromCSVFile
 
int readToLine
 
bool hasHeader
 
int nrows
 
int ncols
 
std::string lineToParse
 
std::vector< std::string > parsedLine
 
std::vector< std::string > colNames
 
std::vector< std::string > colTypes
 
std::vector< std::string > csvToParse
 
std::vector< std::vector
< std::string > > 
strDataStruct
 

Constructor & Destructor Documentation

utilCSV::utilCSV ( )

Contains the data structures receiving the imported data from the CSV file (or going to be written to a CSV file).

Declarations Classes CSV utilities classConstructors

Member Function Documentation

vector< vector< string > > utilCSV::buildDataStruct ( std::vector< std::string >  csvToParse)

build a data Structure / Class of records of types string as vectors of parsed strings of observations data (fields).

void utilCSV::displayColNames ( )

display the current column names

void utilCSV::displayInternCSV ( )

display the csv data read from disk

void utilCSV::displayStrDataStruct ( )

display the data structure of class (strDataStruct) as built

vector< string > utilCSV::getColNames ( )

Accessor-get current column names

vector< string > utilCSV::getColTypes ( )

Accessor get column data types (if provided)

vector< string > utilCSV::getCVS ( )

Accessor-return the uploaded CSV file to caller

int utilCSV::getNcols ( )

Methods Accessor-get number of columns/variables in table

int utilCSV::getNrows ( )

Accessor-get number of rows/observations in table

vector< vector< string > > utilCSV::getStrDataStruct ( )

Accessor-return the data structure (table) to caller

vector< string > utilCSV::parseLine ( std::string  lineToParse)

parse a line of the csv file, return it to caller

vector< string > utilCSV::readCSV ( std::string  iFileN)

read a stated CSV file from disk

void utilCSV::setColNames ( std::vector< std::string >  cnames)

Accessor-reset column names

void utilCSV::setNcols ( )

Accessor-set number of columns/variables in table

void utilCSV::setNrows ( )

Accessor-set number of rows/observations in table

string utilCSV::toString ( )

convert a data structure to a single string object and return the object

void utilCSV::writeCSV ( std::vector< std::vector< std::string > >  strDataStruct,
std::string  oFName 
)

write some data structure of strings to disk as a csv


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