Eclipse SUMO - Simulation of Urban MObility
ParBuffer Class Reference

#include <ParBuffer.h>

Collaboration diagram for ParBuffer:

Public Member Functions

void clear ()
 
std::string escape (std::string str)
 
bool last_empty ()
 
std::string next ()
 
size_t next_escape (std::string str, size_t pos)
 
template<typename T >
ParBufferoperator<< (const T &v)
 
template<typename T >
ParBufferoperator>> (T &v)
 
 ParBuffer ()
 
void set (std::string buf)
 
std::string str () const
 
std::string unescape (std::string str)
 

Private Attributes

const char ESC
 
std::string inBuffer
 
std::stringstream outBuffer
 
const char QUO
 
const char SEP
 
bool was_empty
 

Detailed Description

Definition at line 26 of file ParBuffer.h.

Constructor & Destructor Documentation

◆ ParBuffer()

ParBuffer::ParBuffer ( )
inline

Definition at line 28 of file ParBuffer.h.

References ESC, inBuffer, QUO, SEP, and was_empty.

Member Function Documentation

◆ clear()

void ParBuffer::clear ( )
inline

Definition at line 142 of file ParBuffer.h.

References outBuffer.

◆ escape()

std::string ParBuffer::escape ( std::string  str)
inline

Definition at line 59 of file ParBuffer.h.

References ESC, next_escape(), and QUO.

Referenced by operator<<().

◆ last_empty()

bool ParBuffer::last_empty ( )
inline

Definition at line 135 of file ParBuffer.h.

References was_empty.

Referenced by MSCFModel_CC::setParameter().

◆ next()

std::string ParBuffer::next ( )
inline

Definition at line 99 of file ParBuffer.h.

References ESC, inBuffer, SEP, and unescape().

Referenced by operator>>().

◆ next_escape()

size_t ParBuffer::next_escape ( std::string  str,
size_t  pos 
)
inline

Definition at line 47 of file ParBuffer.h.

References ESC, and SEP.

Referenced by escape().

◆ operator<<()

template<typename T >
ParBuffer& ParBuffer::operator<< ( const T &  v)
inline

Definition at line 34 of file ParBuffer.h.

References escape(), outBuffer, and SEP.

◆ operator>>()

template<typename T >
ParBuffer& ParBuffer::operator>> ( T &  v)
inline

Definition at line 120 of file ParBuffer.h.

References next(), and was_empty.

◆ set()

void ParBuffer::set ( std::string  buf)
inline

Definition at line 139 of file ParBuffer.h.

References inBuffer.

◆ str()

std::string ParBuffer::str ( ) const
inline

Definition at line 145 of file ParBuffer.h.

References outBuffer.

Referenced by MSCFModel_CC::getParameter().

◆ unescape()

std::string ParBuffer::unescape ( std::string  str)
inline

Definition at line 81 of file ParBuffer.h.

References ESC, and QUO.

Referenced by next().

Field Documentation

◆ ESC

const char ParBuffer::ESC
private

Definition at line 151 of file ParBuffer.h.

Referenced by escape(), next(), next_escape(), ParBuffer(), and unescape().

◆ inBuffer

std::string ParBuffer::inBuffer
private

Definition at line 154 of file ParBuffer.h.

Referenced by next(), ParBuffer(), and set().

◆ outBuffer

std::stringstream ParBuffer::outBuffer
private

Definition at line 153 of file ParBuffer.h.

Referenced by clear(), operator<<(), and str().

◆ QUO

const char ParBuffer::QUO
private

Definition at line 152 of file ParBuffer.h.

Referenced by escape(), ParBuffer(), and unescape().

◆ SEP

const char ParBuffer::SEP
private

Definition at line 150 of file ParBuffer.h.

Referenced by next(), next_escape(), operator<<(), and ParBuffer().

◆ was_empty

bool ParBuffer::was_empty
private

Definition at line 155 of file ParBuffer.h.

Referenced by last_empty(), operator>>(), and ParBuffer().


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