VGServer::GraphParser< Callback > Class Template Reference

GraphParser is a static polymorphic class used to parse the data streams returned by the server. More...

#include <GraphParser.h>

List of all members.

Public Member Functions

 GraphParser (Callback &cb, const AttributePropertiesList &_vertexattr, const AttributePropertiesList &_edgeattr)
 initialize the parser for animation parsing with this callback object and the two attribute lists
 GraphParser (Callback &cb)
 initialize the parser with this callback object
bool parse (const ByteBuffer &bbdata)
 parse the given byte input buffer and call the connected callback class for each event
void parseAnimation (const ByteBuffer &bbdata)
 parse the given animation buffer which was recorded by eventAnimationDataBuffer().

Static Public Member Functions

static bool parse (Callback &cb, const ByteBuffer &bb)
 parse the given byte input buffer and call the given callback class for each event.
static void parseAnimation (Callback &cb, const ByteBuffer &bb, const AttributePropertiesList &vertexattr, const AttributePropertiesList &edgeattr)
 parse the given animation buffer which was recorded by eventAnimationDataBuffer().

Protected Member Functions

void parseAnimationData (class ByteInBuffer &bb)
void parseAnimationEdgeData (class ByteInBuffer &bb, std::vector< AnyType > &values)
void parseAnimationFrame (class ByteInBuffer &bb, unsigned int framenum)
void parseAnimationStart (class ByteInBuffer &bb)
void parseAnimationVertexData (class ByteInBuffer &bb, std::vector< AnyType > &values)
void parseAttrlist (class ByteInBuffer &bb, class AttributePropertiesList &apl)
void parseEdgeAttrlist (class ByteInBuffer &bb)
void parseEdgeBodyData (class ByteInBuffer &bb)
void parseGraphProperties (class ByteInBuffer &bb)
void parseVertexAttrlist (class ByteInBuffer &bb)
void parseVertexBodyData (class ByteInBuffer &bb)

Static Protected Member Functions

static bool getBit (int bitnum, char *bitfield)

Protected Attributes

Callback & callback
 link to the callback used during processing
AttributePropertiesList edgeattr
AttributePropertiesList vertexattr


Detailed Description

template<class Callback>
class VGServer::GraphParser< Callback >

GraphParser is a static polymorphic class used to parse the data streams returned by the server.

Definition at line 119 of file GraphParser.h.


Constructor & Destructor Documentation

template<class Callback>
VGServer::GraphParser< Callback >::GraphParser ( Callback &  cb  )  [inline]

initialize the parser with this callback object

Definition at line 131 of file GraphParser.h.

template<class Callback>
VGServer::GraphParser< Callback >::GraphParser ( Callback &  cb,
const AttributePropertiesList _vertexattr,
const AttributePropertiesList _edgeattr 
) [inline]

initialize the parser for animation parsing with this callback object and the two attribute lists

Definition at line 138 of file GraphParser.h.


Member Function Documentation

template<class Callback>
static bool VGServer::GraphParser< Callback >::getBit ( int  bitnum,
char *  bitfield 
) [inline, static, protected]

Definition at line 288 of file GraphParser.h.

template<class Callback>
bool VGServer::GraphParser< Callback >::parse ( const ByteBuffer bbdata  )  [inline]

parse the given byte input buffer and call the connected callback class for each event

Definition at line 154 of file GraphParser.h.

References VGServer::ByteInBuffer::fetch_unsigned_char(), VGServer::ByteInBuffer::fetch_unsigned_int(), VGServer::ByteInBuffer::fetchString(), and VGServer::ByteInBuffer::remaining().

template<class Callback>
static bool VGServer::GraphParser< Callback >::parse ( Callback &  cb,
const ByteBuffer bb 
) [inline, static]

parse the given byte input buffer and call the given callback class for each event.

this creates a temporary GraphParser object.

Definition at line 145 of file GraphParser.h.

References VGServer::GraphParser< Callback >::parse().

Referenced by VGServer::GraphParser< Callback >::parse().

template<class Callback>
void VGServer::GraphParser< Callback >::parseAnimation ( const ByteBuffer bbdata  )  [inline]

parse the given animation buffer which was recorded by eventAnimationDataBuffer().

be aware that the parser requires initialization of vertexattr and edgeattr

Definition at line 234 of file GraphParser.h.

template<class Callback>
static void VGServer::GraphParser< Callback >::parseAnimation ( Callback &  cb,
const ByteBuffer bb,
const AttributePropertiesList vertexattr,
const AttributePropertiesList edgeattr 
) [inline, static]

parse the given animation buffer which was recorded by eventAnimationDataBuffer().

this creates a temporary GraphParser object.

Definition at line 223 of file GraphParser.h.

References VGServer::GraphParser< Callback >::parseAnimation().

Referenced by VGServer::GraphParser< Callback >::parseAnimation().

template<class Callback>
void VGServer::GraphParser< Callback >::parseAnimationData ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 383 of file GraphParser.h.

template<class Callback>
void VGServer::GraphParser< Callback >::parseAnimationEdgeData ( class ByteInBuffer bb,
std::vector< AnyType > &  values 
) [inline, protected]

Definition at line 471 of file GraphParser.h.

References VGServer::ATTRTYPE_BOOL, and VGServer::ATTRTYPE_INVALID.

template<class Callback>
void VGServer::GraphParser< Callback >::parseAnimationFrame ( class ByteInBuffer bb,
unsigned int  framenum 
) [inline, protected]

Definition at line 394 of file GraphParser.h.

template<class Callback>
void VGServer::GraphParser< Callback >::parseAnimationStart ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 363 of file GraphParser.h.

template<class Callback>
void VGServer::GraphParser< Callback >::parseAnimationVertexData ( class ByteInBuffer bb,
std::vector< AnyType > &  values 
) [inline, protected]

Definition at line 446 of file GraphParser.h.

References VGServer::ATTRTYPE_BOOL, and VGServer::ATTRTYPE_INVALID.

template<class Callback>
void VGServer::GraphParser< Callback >::parseAttrlist ( class ByteInBuffer bb,
class AttributePropertiesList apl 
) [inline, protected]

Definition at line 259 of file GraphParser.h.

References VGServer::ATTRTYPE_BOOL.

template<class Callback>
void VGServer::GraphParser< Callback >::parseEdgeAttrlist ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 253 of file GraphParser.h.

template<class Callback>
void VGServer::GraphParser< Callback >::parseEdgeBodyData ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 329 of file GraphParser.h.

References VGServer::ATTRTYPE_BOOL, and VGServer::ATTRTYPE_INVALID.

template<class Callback>
void VGServer::GraphParser< Callback >::parseGraphProperties ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 496 of file GraphParser.h.

template<class Callback>
void VGServer::GraphParser< Callback >::parseVertexAttrlist ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 247 of file GraphParser.h.

template<class Callback>
void VGServer::GraphParser< Callback >::parseVertexBodyData ( class ByteInBuffer bb  )  [inline, protected]

Definition at line 295 of file GraphParser.h.

References VGServer::ATTRTYPE_BOOL, and VGServer::ATTRTYPE_INVALID.


Member Data Documentation

template<class Callback>
Callback& VGServer::GraphParser< Callback >::callback [protected]

link to the callback used during processing

Definition at line 123 of file GraphParser.h.

template<class Callback>
AttributePropertiesList VGServer::GraphParser< Callback >::edgeattr [protected]

Definition at line 127 of file GraphParser.h.

template<class Callback>
AttributePropertiesList VGServer::GraphParser< Callback >::vertexattr [protected]

Definition at line 127 of file GraphParser.h.


The documentation for this class was generated from the following file:
Generated on Wed Sep 27 14:34:01 2006 for VGServer by  doxygen 1.4.7