ARPDAS_QNX6 1.0
|
#include <csv_file.h>
Public Member Functions | |
csv_file (const char *name, unsigned int n_cols, const char *nan_text=NULL, int json=0) | |
~csv_file () | |
void | init () |
void | init_col (unsigned int col_num, const char *colname, const char *fmt=NULL) |
void | set_time (double T) |
void | set_col (unsigned int col_num, double dval) |
void | set_col (unsigned int col_num, const char *sval) |
Static Public Member Functions | |
static void | terminate_on_write_err (int sig) |
Static Public Attributes | |
static const char * | nan = "" |
Private Member Functions | |
void | flush_headers () |
void | flush_row () |
Private Attributes | |
std::vector< csv_col * > | cols |
double | cur_time |
bool | time_set |
bool | json |
const char * | filename |
FILE * | fp |
Definition at line 24 of file csv_file.h.
csv_file::csv_file | ( | const char * | name, |
unsigned int | n_cols, | ||
const char * | nan_text = NULL , |
||
int | json = 0 |
||
) |
csv_file::~csv_file | ( | ) |
Definition at line 132 of file csv_file.cc.
References cols, flush_row(), fp, and time_set.
void csv_file::flush_headers | ( | ) | [private] |
Definition at line 167 of file csv_file.cc.
References cols, fp, json, and nl_assert.
Referenced by set_time().
void csv_file::flush_row | ( | ) | [private] |
Definition at line 179 of file csv_file.cc.
References cols, filename, fp, and json.
Referenced by set_time(), and ~csv_file().
void csv_file::init | ( | ) |
Definition at line 114 of file csv_file.cc.
References filename, fp, json, nl_error, and terminate_on_write_err().
void csv_file::init_col | ( | unsigned int | col_num, |
const char * | colname, | ||
const char * | fmt = NULL |
||
) |
Definition at line 141 of file csv_file.cc.
void csv_file::set_col | ( | unsigned int | col_num, |
const char * | sval | ||
) |
Definition at line 216 of file csv_file.cc.
void csv_file::set_col | ( | unsigned int | col_num, |
double | dval | ||
) |
This interface is not for column zero (Time)
Definition at line 208 of file csv_file.cc.
void csv_file::set_time | ( | double | T | ) |
Definition at line 154 of file csv_file.cc.
References cols, cur_time, flush_headers(), flush_row(), and time_set.
void csv_file::terminate_on_write_err | ( | int | sig | ) | [static] |
Definition at line 125 of file csv_file.cc.
References nl_error.
Referenced by init().
std::vector<csv_col*> csv_file::cols [private] |
Definition at line 40 of file csv_file.h.
Referenced by csv_file(), flush_headers(), flush_row(), init_col(), set_col(), set_time(), and ~csv_file().
double csv_file::cur_time [private] |
Definition at line 41 of file csv_file.h.
Referenced by set_time().
const char* csv_file::filename [private] |
Definition at line 44 of file csv_file.h.
Referenced by csv_file(), flush_row(), and init().
FILE* csv_file::fp [private] |
Definition at line 45 of file csv_file.h.
Referenced by flush_headers(), flush_row(), init(), and ~csv_file().
bool csv_file::json [private] |
Definition at line 43 of file csv_file.h.
Referenced by csv_file(), flush_headers(), flush_row(), and init().
const char * csv_file::nan = "" [static] |
Definition at line 36 of file csv_file.h.
Referenced by csv_file(), and csv_col::set().
bool csv_file::time_set [private] |
Definition at line 42 of file csv_file.h.
Referenced by csv_file(), init_col(), set_time(), and ~csv_file().