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

#include <XMLCursor.hxx>

Classes

class  AttributeValueEqual
 
class  Node
 

Public Types

enum  { WhitespaceSignificant = false }
 
typedef LinkedHashMap< Data, Data, KeyedDataHash > AttributeMap
 

Public Member Functions

 XMLCursor (const ParseBuffer &pb)
 
 ~XMLCursor ()
 
bool nextSibling ()
 
bool firstChild ()
 
bool parent ()
 
void reset ()
 
bool atRoot () const
 
bool atLeaf () const
 
const Data & getTag () const
 
const AttributeMap & getAttributes () const
 
const Data & getValue () const
 

Static Public Member Functions

static EncodeStream & encode (EncodeStream &strm, const AttributeMap &attrs)
 

Static Public Attributes

static constexpr size_t MaxAttributes = 256
 getAttributes() fails (ParseException) an element with more attributes than this
 
static constexpr unsigned int MaxNestingDepth = 100
 Parsing fails (ParseException) a document with elements nested more than this many levels below the root element.
 

Friends

class Node
 
EncodeStream & operator<< (EncodeStream &, const XMLCursor &)
 
EncodeStream & operator<< (EncodeStream &, const XMLCursor::Node &)
 

Detailed Description

Definition at line 98 of file XMLCursor.hxx.

Member Typedef Documentation

◆ AttributeMap

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
WhitespaceSignificant 

Definition at line 103 of file XMLCursor.hxx.

Constructor & Destructor Documentation

◆ XMLCursor()

XMLCursor::XMLCursor ( const ParseBuffer &  pb)

Definition at line 60 of file XMLCursor.cxx.

◆ ~XMLCursor()

XMLCursor::~XMLCursor ( )

Definition at line 138 of file XMLCursor.cxx.

Member Function Documentation

◆ atLeaf()

bool XMLCursor::atLeaf ( ) const

Definition at line 330 of file XMLCursor.cxx.

◆ atRoot()

bool XMLCursor::atRoot ( ) const

Definition at line 324 of file XMLCursor.cxx.

◆ encode()

EncodeStream & XMLCursor::encode ( EncodeStream &  strm,
const AttributeMap &  attrs 
)
static

Definition at line 435 of file XMLCursor.cxx.

◆ firstChild()

bool XMLCursor::firstChild ( )

Definition at line 280 of file XMLCursor.cxx.

◆ getAttributes()

const XMLCursor::AttributeMap & XMLCursor::getAttributes ( ) const

Definition at line 350 of file XMLCursor.cxx.

◆ getTag()

const Data & XMLCursor::getTag ( ) const

Definition at line 336 of file XMLCursor.cxx.

◆ getValue()

const Data & XMLCursor::getValue ( ) const

Definition at line 418 of file XMLCursor.cxx.

◆ nextSibling()

bool XMLCursor::nextSibling ( )

Definition at line 253 of file XMLCursor.cxx.

◆ parent()

bool XMLCursor::parent ( )

Definition at line 304 of file XMLCursor.cxx.

◆ reset()

void XMLCursor::reset ( )

Definition at line 317 of file XMLCursor.cxx.

Friends And Related Symbol Documentation

◆ Node

friend class Node
friend

Definition at line 206 of file XMLCursor.hxx.

◆ operator<< [1/2]

EncodeStream & operator<< ( EncodeStream &  ,
const XMLCursor &   
)
friend

◆ operator<< [2/2]

EncodeStream & operator<< ( EncodeStream &  ,
const XMLCursor::Node &   
)
friend

Member Data Documentation

◆ MaxAttributes

constexpr size_t resip::XMLCursor::MaxAttributes = 256
staticconstexpr

getAttributes() fails (ParseException) an element with more attributes than this

Definition at line 123 of file XMLCursor.hxx.

◆ MaxNestingDepth

constexpr unsigned int resip::XMLCursor::MaxNestingDepth = 100
staticconstexpr

Parsing fails (ParseException) a document with elements nested more than this many levels below the root element.

Each nested element costs a stack frame while parsing and another while the tree is destroyed, so without a bound very deep nesting would recurse until the stack is exhausted. Real bodies (PIDF, dialog-info, ...) nest only a few levels.

Definition at line 130 of file XMLCursor.hxx.


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