ARPDAS_QNX6 1.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
csv_file Class Reference

#include <csv_file.h>

Collaboration diagram for csv_file:

List of all members.

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

Detailed Description

Definition at line 24 of file csv_file.h.


Constructor & Destructor Documentation

csv_file::csv_file ( const char *  name,
unsigned int  n_cols,
const char *  nan_text = NULL,
int  json = 0 
)

Definition at line 104 of file csv_file.cc.

References cols, filename, json, nan, and time_set.

csv_file::~csv_file ( )

Definition at line 132 of file csv_file.cc.

References cols, flush_row(), fp, and time_set.

Here is the call graph for this function:


Member Function Documentation

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

void csv_file::init ( )

Definition at line 114 of file csv_file.cc.

References filename, fp, json, nl_error, and terminate_on_write_err().

Here is the call graph for this function:

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.

References cols, nl_error, and time_set.

void csv_file::set_col ( unsigned int  col_num,
const char *  sval 
)

Definition at line 216 of file csv_file.cc.

References cols, and nl_error.

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.

References cols, and nl_error.

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.

Here is the call graph for this function:

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().

Here is the caller graph for this function:


Member Data Documentation

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().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines