Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
pinocchio::CsvStream Class Reference

#include <file-io.hpp>

Public Member Functions

 CsvStream (const std::string filename, const std::string separator=",")
 
void endrow ()
 
void flush ()
 
CsvStreamoperator<< (const char *val)
 
CsvStreamoperator<< (const std::string &val)
 
template<typename T >
CsvStreamoperator<< (const T &val)
 
CsvStreamoperator<< (CsvStream &(*val)(CsvStream &))
 
 ~CsvStream ()
 

Static Public Member Functions

static CsvStreamendl (CsvStream &file)
 

Private Member Functions

std::string escape (const std::string &val)
 
template<typename T >
CsvStreamwrite (const T &val)
 

Private Attributes

const std::string escape_seq_
 
std::ofstream fs_
 
bool is_first_
 
const std::string separator_
 
const std::string special_chars_
 

Detailed Description

Definition at line 16 of file file-io.hpp.

Constructor & Destructor Documentation

◆ CsvStream()

pinocchio::CsvStream::CsvStream ( const std::string  filename,
const std::string  separator = "," 
)
inline

Definition at line 25 of file file-io.hpp.

◆ ~CsvStream()

pinocchio::CsvStream::~CsvStream ( )
inline

Definition at line 36 of file file-io.hpp.

Member Function Documentation

◆ endl()

static CsvStream& pinocchio::CsvStream::endl ( CsvStream file)
inlinestatic

Definition at line 47 of file file-io.hpp.

◆ endrow()

void pinocchio::CsvStream::endrow ( )
inline

Definition at line 53 of file file-io.hpp.

◆ escape()

std::string pinocchio::CsvStream::escape ( const std::string &  val)
inlineprivate

Definition at line 96 of file file-io.hpp.

◆ flush()

void pinocchio::CsvStream::flush ( )
inline

Definition at line 42 of file file-io.hpp.

◆ operator<<() [1/4]

CsvStream& pinocchio::CsvStream::operator<< ( const char *  val)
inline

Definition at line 64 of file file-io.hpp.

◆ operator<<() [2/4]

CsvStream& pinocchio::CsvStream::operator<< ( const std::string &  val)
inline

Definition at line 69 of file file-io.hpp.

◆ operator<<() [3/4]

template<typename T >
CsvStream& pinocchio::CsvStream::operator<< ( const T &  val)
inline

Definition at line 75 of file file-io.hpp.

◆ operator<<() [4/4]

CsvStream& pinocchio::CsvStream::operator<< ( CsvStream &(*)(CsvStream &)  val)
inline

Definition at line 59 of file file-io.hpp.

◆ write()

template<typename T >
CsvStream& pinocchio::CsvStream::write ( const T &  val)
inlineprivate

Definition at line 82 of file file-io.hpp.

Member Data Documentation

◆ escape_seq_

const std::string pinocchio::CsvStream::escape_seq_
private

Definition at line 21 of file file-io.hpp.

◆ fs_

std::ofstream pinocchio::CsvStream::fs_
private

Definition at line 18 of file file-io.hpp.

◆ is_first_

bool pinocchio::CsvStream::is_first_
private

Definition at line 19 of file file-io.hpp.

◆ separator_

const std::string pinocchio::CsvStream::separator_
private

Definition at line 20 of file file-io.hpp.

◆ special_chars_

const std::string pinocchio::CsvStream::special_chars_
private

Definition at line 22 of file file-io.hpp.


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


pinocchio
Author(s):
autogenerated on Sun Dec 22 2024 03:41:14