NDDEM
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
XMLWriter Class Reference

#include <Xml.h>

Public Member Functions

 XMLWriter (string path)
 
void header (int dimension, string input)
 
void writeTs (double ts, tuple< string, vector< vector< double >> *, ArrayType > a)
 
void startTS (double ts)
 
void writeArray (string name, vector< vector< double >> *x, int beg, int length, ArrayType t, EncodingType te=EncodingType::ascii)
 
void writeArray (string name, std::vector< std::vector< double > > *x, ArrayType t, EncodingType te=EncodingType::ascii)
 
void writeArray (string name, std::vector< double > *x, ArrayType t, EncodingType te=EncodingType::ascii)
 
void stopTS ()
 
void close ()
 
void emergencyclose ()
 
void openbranch (string name, vector< pair< string, string >> attributes)
 
void openbranch (string name)
 
template<class T >
void smallbranch (string name, T value)
 
template<class T >
void smallbranch (string name, vector< pair< string, string >> attributes, T value)
 
bool closebranch ()
 

Public Attributes

ofstream fic
 

Private Member Functions

int encodebase64f (ostream &out, vector< double > &val)
 
void encodebase64f_end (ostream &out)
 
string quote (string a)
 

Private Attributes

vector< pair< double, streampos > > index
 
unsigned char state =0
 
unsigned char remainer =0
 
stack< string > hierarchy
 

Constructor & Destructor Documentation

◆ XMLWriter()

XMLWriter::XMLWriter ( string  path)
inline

Member Function Documentation

◆ close()

void XMLWriter::close ( )

◆ closebranch()

bool XMLWriter::closebranch ( )

◆ emergencyclose()

void XMLWriter::emergencyclose ( )

◆ encodebase64f()

int XMLWriter::encodebase64f ( ostream &  out,
vector< double > &  val 
)
private

◆ encodebase64f_end()

void XMLWriter::encodebase64f_end ( ostream &  out)
inlineprivate

◆ header()

void XMLWriter::header ( int  dimension,
string  input 
)

◆ openbranch() [1/2]

void XMLWriter::openbranch ( string  name)
inline

◆ openbranch() [2/2]

void XMLWriter::openbranch ( string  name,
vector< pair< string, string >>  attributes 
)

◆ quote()

string XMLWriter::quote ( string  a)
inlineprivate

◆ smallbranch() [1/2]

template<class T >
void XMLWriter::smallbranch ( string  name,
value 
)

◆ smallbranch() [2/2]

template<class T >
void XMLWriter::smallbranch ( string  name,
vector< pair< string, string >>  attributes,
value 
)

◆ startTS()

void XMLWriter::startTS ( double  ts)

◆ stopTS()

void XMLWriter::stopTS ( )

◆ writeArray() [1/3]

void XMLWriter::writeArray ( string  name,
std::vector< double > *  x,
ArrayType  t,
EncodingType  te = EncodingType::ascii 
)

◆ writeArray() [2/3]

void XMLWriter::writeArray ( string  name,
std::vector< std::vector< double > > *  x,
ArrayType  t,
EncodingType  te = EncodingType::ascii 
)

◆ writeArray() [3/3]

void XMLWriter::writeArray ( string  name,
vector< vector< double >> *  x,
int  beg,
int  length,
ArrayType  t,
EncodingType  te = EncodingType::ascii 
)

◆ writeTs()

void XMLWriter::writeTs ( double  ts,
tuple< string, vector< vector< double >> *, ArrayType a 
)

Member Data Documentation

◆ fic

ofstream XMLWriter::fic

◆ hierarchy

stack<string> XMLWriter::hierarchy
private

◆ index

vector<pair<double,streampos> > XMLWriter::index
private

◆ remainer

unsigned char XMLWriter::remainer =0
private

◆ state

unsigned char XMLWriter::state =0
private

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