TPProto::FrameBuilder Class Reference

Builds Frames from frame type and Buffer. More...

#include <framebuilder.h>

List of all members.

Public Member Functions

 FrameBuilder ()
 Constructs object and sets up defaults.
virtual ~FrameBuilder ()
 Destructor.
void setProtocolLayer (ProtocolLayer *pl)
 Sets the ProtocolLayer.
void setOrderDescCache (OrderDescCache *odc)
void setObjectDescCache (ObjectDescCache *odc)
void setCommandDescCache (CommandDescCache *cdc)
virtual void buildFrame (uint32_t type, Buffer *data, uint32_t ftver, uint32_t seqnum)
 Builds a frame from it's type. Builds a frame subclass object that corresponds to the type given, or NULL if none is found. Frame sent to FrameCodec::receivedFrame().

Protected Member Functions

void processOrderDescription (Frame *frame, Buffer *data, boost::shared_ptr< OrderDescription > od)
void processObjectDescription (Frame *frame, Buffer *data, boost::shared_ptr< ObjectDescription > od)
void processCommandDescription (Frame *frame, Buffer *data, boost::shared_ptr< CommandDescription > cd)

Protected Attributes

ProtocolLayerlayer
 The ProtocolLayer this FrameBuilder is part of.
OrderDescCacheorderdesccache
ObjectDescCacheobjectdesccache
CommandDescCachecommanddesccache


Detailed Description

Builds Frames from frame type and Buffer.

Also creates Objects from object types, Orders from order types, and Commands from command types.


Member Function Documentation

void TPProto::FrameBuilder::setProtocolLayer ( ProtocolLayer pl  ) 

Sets the ProtocolLayer.

Parameters:
pl The ProtocolLayer to use.

void TPProto::FrameBuilder::buildFrame ( uint32_t  type,
Buffer data,
uint32_t  ftver,
uint32_t  seqnum 
) [virtual]

Builds a frame from it's type. Builds a frame subclass object that corresponds to the type given, or NULL if none is found. Frame sent to FrameCodec::receivedFrame().

Parameters:
type The type of frame to build.
data The Buffer of data that is the contents of the frame.
ftver The version of the frametype
seqnum The sequence number


Member Data Documentation

OrderDescCache* TPProto::FrameBuilder::orderdesccache [protected]

The OrderDescCache to use to create Orders.

ObjectDescCache* TPProto::FrameBuilder::objectdesccache [protected]

The ObjectDescCache to use to create Objects.

CommandDescCache* TPProto::FrameBuilder::commanddesccache [protected]

The CommandDescCache to use to create Commands.


The documentation for this class was generated from the following files:
Generated on Thu Nov 20 10:15:45 2008 for libtpproto-cpp by  doxygen 1.5.1