reSIProcate
SIP stack, Dialog Usage Manager and related libraries
Loading...
Searching...
No Matches
resip::ParserContainerBase Class Referenceabstract

Abstract Base class implemented in derived class ParserContainer. More...

#include <ParserContainerBase.hxx>

Inheritance diagram for resip::ParserContainerBase:
[legend]

Classes

class  HeaderKit
 

Public Types

typedef size_t size_type
 

Public Member Functions

 ParserContainerBase (Headers::Type type=Headers::UNKNOWN)
 constructor; sets the type only
 
 ParserContainerBase (Headers::Type type, PoolBase &pool)
 constructor; sets the type only
 
 ParserContainerBase (const ParserContainerBase &rhs)
 copy constructor copies the mType and the mParsers from the rhs
 
 ParserContainerBase (const ParserContainerBase &rhs, PoolBase &pool)
 
ParserContainerBase & operator= (const ParserContainerBase &rhs)
 assignment operator copies the mParsers from the rhs
 
virtual ~ParserContainerBase ()
 virtual destructor - empty in this class
 
void clear ()
 clear the mParsers vector
 
virtual ParserContainerBase * clone () const =0
 pure virtual function to be implemented in derived classes with the intention of cloning this object
 
size_t size () const
 return the size of the mParsers vector
 
bool empty () const
 return true or false indicating whether the mParsers vector is empty or not
 
EncodeStream & encode (const Data &headerName, EncodeStream &str) const
 
std::ostream & encode (Headers::Type type, std::ostream &str) const
 
EncodeStream & encodeEmbedded (const Data &headerName, EncodeStream &str) const
 
void pop_front ()
 if mParsers vector is not empty, erase the first element
 
void pop_back ()
 if mParsers vector is not empty, erase the first element
 
void append (const ParserContainerBase &rhs)
 append the vector to the mParsers vector held locally
 
virtual void parseAll ()=0
 pure virtual function to be implemented in derived classes The intention is to provide an ability to parse all elements in the mParsers vector.
 
bool getHeaderValueByIndex (size_t index, Data &headerValue) const
 

Protected Types

typedef std::vector< HeaderKit, StlPoolAllocator< HeaderKit, PoolBase > > Parsers
 

Protected Member Functions

void copyParsers (const Parsers &parsers)
 copy header kits
 
void freeParsers ()
 free parser containers
 
void freeParser (HeaderKit &kit)
 
ParserCategory * makeParser (const ParserCategory &orig)
 

Protected Attributes

const Headers::Type mType
 
Parsers mParsers
 the actual list (vector) of parsers on which encoding is done
 
PoolBase * mPool
 

Detailed Description

Abstract Base class implemented in derived class ParserContainer.

Definition at line 22 of file ParserContainerBase.hxx.

Member Typedef Documentation

◆ Parsers

Definition at line 182 of file ParserContainerBase.hxx.

◆ size_type

Definition at line 25 of file ParserContainerBase.hxx.

Constructor & Destructor Documentation

◆ ParserContainerBase() [1/4]

ParserContainerBase::ParserContainerBase ( Headers::Type  type = Headers::UNKNOWN)

constructor; sets the type only

Definition at line 11 of file ParserContainerBase.cxx.

◆ ParserContainerBase() [2/4]

ParserContainerBase::ParserContainerBase ( Headers::Type  type,
PoolBase &  pool 
)

constructor; sets the type only

Definition at line 24 of file ParserContainerBase.cxx.

◆ ParserContainerBase() [3/4]

ParserContainerBase::ParserContainerBase ( const ParserContainerBase &  rhs)

copy constructor copies the mType and the mParsers from the rhs

Note
this is a shallow copy

Definition at line 16 of file ParserContainerBase.cxx.

◆ ParserContainerBase() [4/4]

ParserContainerBase::ParserContainerBase ( const ParserContainerBase &  rhs,
PoolBase &  pool 
)

Definition at line 31 of file ParserContainerBase.cxx.

◆ ~ParserContainerBase()

ParserContainerBase::~ParserContainerBase ( )
virtual

virtual destructor - empty in this class

Definition at line 40 of file ParserContainerBase.cxx.

Member Function Documentation

◆ append()

void ParserContainerBase::append ( const ParserContainerBase &  rhs)

append the vector to the mParsers vector held locally

Parameters
rhsis the vector whose elements will be added to the local mParsers vector

Definition at line 74 of file ParserContainerBase.cxx.

◆ clear()

void resip::ParserContainerBase::clear ( )
inline

clear the mParsers vector

Definition at line 61 of file ParserContainerBase.hxx.

◆ clone()

virtual ParserContainerBase * resip::ParserContainerBase::clone ( ) const
pure virtual

pure virtual function to be implemented in derived classes with the intention of cloning this object

Implemented in resip::ParserContainer< T >, resip::ParserContainer< Mime >, resip::ParserContainer< NameAddr >, resip::ParserContainer< resip::Token >, and resip::ParserContainer< Token >.

◆ copyParsers()

void ParserContainerBase::copyParsers ( const Parsers &  parsers)
protected

copy header kits

Definition at line 152 of file ParserContainerBase.cxx.

◆ empty()

bool resip::ParserContainerBase::empty ( ) const
inline

return true or false indicating whether the mParsers vector is empty or not

Definition at line 78 of file ParserContainerBase.hxx.

◆ encode() [1/2]

EncodeStream & ParserContainerBase::encode ( const Data &  headerName,
EncodeStream &  str 
) const

Definition at line 80 of file ParserContainerBase.cxx.

◆ encode() [2/2]

std::ostream & resip::ParserContainerBase::encode ( Headers::Type  type,
std::ostream &  str 
) const

◆ encodeEmbedded()

EncodeStream & ParserContainerBase::encodeEmbedded ( const Data &  headerName,
EncodeStream &  str 
) const

Definition at line 118 of file ParserContainerBase.cxx.

◆ freeParser()

void resip::ParserContainerBase::freeParser ( HeaderKit &  kit)
inlineprotected

Definition at line 199 of file ParserContainerBase.hxx.

◆ freeParsers()

void ParserContainerBase::freeParsers ( )
protected

free parser containers

Definition at line 174 of file ParserContainerBase.cxx.

◆ getHeaderValueByIndex()

bool ParserContainerBase::getHeaderValueByIndex ( size_t  index,
Data &  headerValue 
) const

Definition at line 183 of file ParserContainerBase.cxx.

◆ makeParser()

ParserCategory * resip::ParserContainerBase::makeParser ( const ParserCategory &  orig)
inlineprotected

Definition at line 216 of file ParserContainerBase.hxx.

◆ operator=()

ParserContainerBase & ParserContainerBase::operator= ( const ParserContainerBase &  rhs)

assignment operator copies the mParsers from the rhs

Note
this is a shallow copy

Definition at line 46 of file ParserContainerBase.cxx.

◆ parseAll()

virtual void resip::ParserContainerBase::parseAll ( )
pure virtual

pure virtual function to be implemented in derived classes The intention is to provide an ability to parse all elements in the mParsers vector.

Implemented in resip::ParserContainer< T >, resip::ParserContainer< Mime >, resip::ParserContainer< NameAddr >, resip::ParserContainer< resip::Token >, and resip::ParserContainer< Token >.

◆ pop_back()

void ParserContainerBase::pop_back ( )

if mParsers vector is not empty, erase the first element

Definition at line 66 of file ParserContainerBase.cxx.

◆ pop_front()

void ParserContainerBase::pop_front ( )

if mParsers vector is not empty, erase the first element

Definition at line 58 of file ParserContainerBase.cxx.

◆ size()

size_t resip::ParserContainerBase::size ( ) const
inline

return the size of the mParsers vector

Definition at line 72 of file ParserContainerBase.hxx.

Member Data Documentation

◆ mParsers

Parsers resip::ParserContainerBase::mParsers
protected

the actual list (vector) of parsers on which encoding is done

Definition at line 186 of file ParserContainerBase.hxx.

◆ mPool

PoolBase* resip::ParserContainerBase::mPool
protected

Definition at line 187 of file ParserContainerBase.hxx.

◆ mType

const Headers::Type resip::ParserContainerBase::mType
protected

Definition at line 128 of file ParserContainerBase.hxx.


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