Tracore
Static Public Member Functions | List of all members
util::FileIO Class Reference

#include <FileIO.h>

Static Public Member Functions

static void ReadCSV (core::Vector3d &values, const std::string &filename, const char &delimiter=';')
 
static void ReadCSV (core::Vector2d &values, const std::string &filename, const char &delimiter=';')
 

Detailed Description

Utility class for file in- and output.

Member Function Documentation

void util::FileIO::ReadCSV ( core::Vector3d &  values,
const std::string &  filename,
const char &  delimiter = ';' 
)
static

Reads a CSV file and stores the values in a 3D array. The first dimension is the first value of each row, used as a index to bundle multiple rows with the same first value into a single vector. The second dimension is the row in the row bundle. The third dimension is the value in that row.

Parameters
valuesThe 3D array of values to store the read values in
filenameThe filename to read from
delimiterThe delimiter used to separate the values in the file
void util::FileIO::ReadCSV ( core::Vector2d &  values,
const std::string &  filename,
const char &  delimiter = ';' 
)
static

Reads a CSV file and stores the values in a 2D array. The first dimension is the row and the second the value in that row.

Parameters
valuesThe 2D array of values to store the read values in
filenameThe filename to read from
delimiterThe delimiter used to separate the values in the file

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