TPProto::FrameFactory Class Reference

FrameFactory baseclass. More...

#include <framefactory.h>

List of all members.

Public Member Functions

 FrameFactory ()
 Constructs object and sets up defaults.
virtual ~FrameFactory ()
 Require virtual destructor.
void setProtocolVersion (int ver)
 Sets the protocol version the frames should have.
int getProtocolVersion () const
 Gets the protocol version.
void setProtocolLayer (ProtocolLayer *pl)
 Sets the ProtocolLayer.
virtual OkFramecreateOk ()
 Creates an OkFrame.
virtual FailFramecreateFail ()
 Creates a FailFrame.
virtual SequencecreateSequence ()
 Creates a Sequence Frame.
virtual ConnectcreateConnect ()
 Creates a Connect Frame.
virtual AccountCreatecreateAccountCreate ()
 Creates an AccountCreate Frame.
virtual LogincreateLogin ()
 Creates a Login Frame.
virtual RedirectcreateRedirect ()
 Creates a Redirect Frame.
virtual GetFeaturescreateGetFeatures ()
 Creates a GetFeatures Frame.
virtual FeaturescreateFeatures ()
 Creates a Features Frame.
virtual SetFilterscreateSetFilters ()
 Creates a Set Filters Frame.
virtual GetGameInfocreateGetGameInfo ()
 Creates a Get Game Info Frame.
virtual GameInfocreateGameInfo ()
 Creates a Game Info Frame.
virtual PingcreatePing ()
 Creates a Ping Frame.
virtual FinishedFramecreateFinished ()
 Creates a Finished Turn Frame.
virtual GetObjectTypesListcreateGetObjectTypesList ()
 Creates a Get Object Types List Frame.
virtual ObjectTypesListcreateObjectTypesList ()
 Creates an Object Types List Frame.
virtual GetObjectDescriptioncreateGetObjectDescription ()
 Creates a Get Object Description Frame.
virtual ObjectDescriptioncreateObjectDescription ()
 Creates an Object Description Frame.
virtual ObjectcreateObject ()
 Creates an Object Frame.
virtual GetObjectByIdcreateGetObjectById ()
 Creates a GetObjectById Frame.
virtual GetObjectByPoscreateGetObjectByPos ()
 Creates a GetObjectByPos Frame.
virtual GetObjectIdsListcreateGetObjectIdsList ()
 Creates a GetObjectIdsList Frame.
virtual GetObjectIdsByPoscreateGetObjectIdsByPos ()
 Creates a GetObjectIdsByPos Frame.
virtual GetObjectIdsByContainercreateGetObjectIdsByContainer ()
 Creates a GetObjectIdsByContainer Frame.
virtual ObjectIdsListcreateObjectIdsList ()
 Creates an ObjectIdsList Frame.
virtual GetOrderDescriptioncreateGetOrderDescription ()
 Creates a GetOrderDescription Frame.
virtual OrderDescriptioncreateOrderDescription ()
 Creates an OrderDescription Frame.
virtual GetOrderTypesListcreateGetOrderTypesList ()
 Creates a GetOrderTypesList Frame.
virtual OrderTypesListcreateOrderTypesList ()
 Creates an OrderTypesList Frame.
virtual GetOrdercreateGetOrder ()
 Creates a GetOrder Frame.
virtual OrdercreateOrder ()
 Creates an Order Frame.
virtual OrdercreateInsertOrder ()
 Creates an InsertOrder Frame.
virtual RemoveOrdercreateRemoveOrder ()
 Creates a RemoveOrder Frame.
virtual ProbeOrdercreateProbeOrder ()
 Creates a ProbeOrder Frame.
virtual GetTimecreateGetTimeRemaining ()
 Creates a GetTimeRemaining Frame.
virtual TimeRemainingcreateTimeRemaining ()
 Creates a TimeRemaining Frame.
virtual GetBoardcreateGetBoard ()
 Creates a GetBoard Frame.
virtual BoardcreateBoard ()
 Creates a Board Frame.
virtual GetBoardIdsListcreateGetBoardIdsList ()
 Creates a GetBoardIdsList Frame.
virtual BoardIdsListcreateBoardIdsList ()
 Creates a BoardIdsList Frame.
virtual GetMessagecreateGetMessage ()
 Creates a GetMessage Frame.
virtual MessagecreateMessage ()
 Creates a Message Frame.
virtual MessagecreatePostMessage ()
 Creates a PostMessage Frame.
virtual RemoveMessagecreateRemoveMessage ()
 Creates a RemoveMessage Frame.
virtual GetResourceDescriptioncreateGetResourceDescription ()
 Creates a GetResoureceDescription Frame.
virtual ResourceDescriptioncreateResourceDescription ()
 Creates a ResourceDescription Frame.
virtual GetResourceTypesListcreateGetResourceTypesList ()
 Creates a GetResourceTypesList Frame.
virtual ResourceTypesListcreateResourceTypesList ()
 Creates a ResourceTypesList Frame.
virtual GetPlayercreateGetPlayer ()
 Creates a GetPlayer Frame.
virtual PlayercreatePlayer ()
 Creates a Player Frame.
virtual GetPlayerIdsListcreateGetPlayerIdsList ()
 Creates a GetPlayerIdsList Frame.
virtual PlayerIdsListcreatePlayerIdsList ()
 Creates a PlayerIdsList Frame.
virtual GetCategorycreateGetCategory ()
 Creates a GetCategory Frame.
virtual CategorycreateCategory ()
 Creates a Category Frame.
virtual AddCategorycreateAddCategory ()
 Creates an AddCategory Frame.
virtual RemoveCategorycreateRemoveCategory ()
 Creates a RemoveCategory Frame.
virtual GetCategoryIdsListcreateGetCategoryIdsList ()
 Creates a GetCategoryIdsList Frame.
virtual CategoryIdsListcreateCategoryIdsList ()
 Creates a CategoryIdsList Frame.
virtual GetDesigncreateGetDesign ()
 Creates a GetDesign Frame.
virtual DesigncreateDesign ()
 Creates a Design Frame.
virtual AddDesigncreateAddDesign ()
 Creates an AddDesign Frame.
virtual ModifyDesigncreateModifyDesign ()
 Creates a ModifyDesign Frame.
virtual RemoveDesigncreateRemoveDesign ()
 Creates a RemoveDesign Frame.
virtual GetDesignIdsListcreateGetDesignIdsList ()
 Creates a GetDesignIdsList Frame.
virtual DesignIdsListcreateDesignIdsList ()
 Creates a DesignIdsList Frame.
virtual GetComponentcreateGetComponent ()
 Creates a GetComponent Frame.
virtual ComponentcreateComponent ()
 Creates a Component Frame.
virtual GetComponentIdsListcreateGetComponentIdsList ()
 Creates a GetComponentIdsList Frame.
virtual ComponentIdsListcreateComponentIdsList ()
 Creates a ComponentIdsList Frame.
virtual GetPropertycreateGetProperty ()
 Creates a GetProperty Frame.
virtual PropertycreateProperty ()
 Creates a Property Frame.
virtual GetPropertyIdsListcreateGetPropertyIdsList ()
 Creates a GetPropertyIdsList Frame.
virtual PropertyIdsListcreatePropertyIdsList ()
 Creates a PropertyIdsList Frame.
virtual LogMessagecreateLogMessage ()
 Creates a LogMessage Frame.
virtual GetCommandDescriptioncreateGetCommandDescription ()
 Creates a GetCommandDescription Frame.
virtual CommandDescriptioncreateCommandDescription ()
 Creates a CommandDescription Frame.
virtual GetCommandTypesListcreateGetCommandTypesList ()
 Creates a GetCommandTypesList Frame.
virtual CommandTypesListcreateCommandTypesList ()
 Creates a CommandTypesList Frame.
virtual CommandcreateCommand ()
 Creates a Command Frame.
virtual CommandResultcreateCommandResult ()
 Creates a CommandResult Frame.

Protected Attributes

int pver
 The Protocol Version to make frames for.
ProtocolLayerlayer
 The ProtocolLayer this FrameFactory is part of.

Detailed Description

FrameFactory baseclass.

The FrameFactory creates frames of different types according to the parameters and the method called. Subclass this class if you want to create driviates of the various types of frames.


Constructor & Destructor Documentation

TPProto::FrameFactory::FrameFactory (  ) 

Constructs object and sets up defaults.

Defaults are

  • version 4 of the protocol

References pver.


Member Function Documentation

AccountCreate * TPProto::FrameFactory::createAccountCreate (  )  [virtual]
AddCategory * TPProto::FrameFactory::createAddCategory (  )  [virtual]
AddDesign * TPProto::FrameFactory::createAddDesign (  )  [virtual]
Board * TPProto::FrameFactory::createBoard (  )  [virtual]

Creates a Board Frame.

Returns:
A new Board Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

BoardIdsList * TPProto::FrameFactory::createBoardIdsList (  )  [virtual]
Category * TPProto::FrameFactory::createCategory (  )  [virtual]
CategoryIdsList * TPProto::FrameFactory::createCategoryIdsList (  )  [virtual]
Command * TPProto::FrameFactory::createCommand (  )  [virtual]

Creates a Command Frame.

Returns:
A new Command Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::AdminLayer::sendCommand().

CommandDescription * TPProto::FrameFactory::createCommandDescription (  )  [virtual]
CommandResult * TPProto::FrameFactory::createCommandResult (  )  [virtual]
CommandTypesList * TPProto::FrameFactory::createCommandTypesList (  )  [virtual]
Component * TPProto::FrameFactory::createComponent (  )  [virtual]
ComponentIdsList * TPProto::FrameFactory::createComponentIdsList (  )  [virtual]
Connect * TPProto::FrameFactory::createConnect (  )  [virtual]
Design * TPProto::FrameFactory::createDesign (  )  [virtual]

Creates a Design Frame.

Returns:
A new Design Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

DesignIdsList * TPProto::FrameFactory::createDesignIdsList (  )  [virtual]
FailFrame * TPProto::FrameFactory::createFail (  )  [virtual]

Creates a FailFrame.

Returns:
A new FailFrame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

Features * TPProto::FrameFactory::createFeatures (  )  [virtual]
FinishedFrame * TPProto::FrameFactory::createFinished (  )  [virtual]

Creates a Finished Turn Frame.

Returns:
A new Finished Turn Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::GameLayer::finishedTurn().

GameInfo * TPProto::FrameFactory::createGameInfo (  )  [virtual]

Creates a Game Info Frame.

Returns:
A new Game Info Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

GetBoard * TPProto::FrameFactory::createGetBoard (  )  [virtual]
GetBoardIdsList * TPProto::FrameFactory::createGetBoardIdsList (  )  [virtual]
GetCategory * TPProto::FrameFactory::createGetCategory (  )  [virtual]
GetCategoryIdsList * TPProto::FrameFactory::createGetCategoryIdsList (  )  [virtual]
GetCommandDescription * TPProto::FrameFactory::createGetCommandDescription (  )  [virtual]
GetCommandTypesList * TPProto::FrameFactory::createGetCommandTypesList (  )  [virtual]
GetComponent * TPProto::FrameFactory::createGetComponent (  )  [virtual]
GetComponentIdsList * TPProto::FrameFactory::createGetComponentIdsList (  )  [virtual]

Creates a GetComponentIdsList Frame.

Returns:
A new GetCompenentIdsList Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::ComponentCache::createGetIdSequenceFrame().

GetDesign * TPProto::FrameFactory::createGetDesign (  )  [virtual]
GetDesignIdsList * TPProto::FrameFactory::createGetDesignIdsList (  )  [virtual]
GetFeatures * TPProto::FrameFactory::createGetFeatures (  )  [virtual]

Creates a GetFeatures Frame.

Returns:
A new GetFeatures Frame.

References pver, and TPProto::Frame::setProtocolVersion().

GetGameInfo * TPProto::FrameFactory::createGetGameInfo (  )  [virtual]

Creates a Get Game Info Frame.

Returns:
A new Get Game Info Frame.

References pver, and TPProto::Frame::setProtocolVersion().

GetMessage * TPProto::FrameFactory::createGetMessage (  )  [virtual]

Creates a GetMessage Frame.

Returns:
A new GetMessage Frame.

References pver, and TPProto::Frame::setProtocolVersion().

GetObjectById * TPProto::FrameFactory::createGetObjectById (  )  [virtual]
GetObjectByPos * TPProto::FrameFactory::createGetObjectByPos (  )  [virtual]
GetObjectDescription * TPProto::FrameFactory::createGetObjectDescription (  )  [virtual]

Creates a Get Object Description Frame.

Returns:
A new Get Object Description Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::ObjectDescCache::createGetByIdFrame().

GetObjectIdsByContainer * TPProto::FrameFactory::createGetObjectIdsByContainer (  )  [virtual]
GetObjectIdsByPos * TPProto::FrameFactory::createGetObjectIdsByPos (  )  [virtual]
GetObjectIdsList * TPProto::FrameFactory::createGetObjectIdsList (  )  [virtual]
GetObjectTypesList * TPProto::FrameFactory::createGetObjectTypesList (  )  [virtual]

Creates a Get Object Types List Frame.

Returns:
A new Get Object Types List Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::ObjectDescCache::createGetIdSequenceFrame().

GetOrder * TPProto::FrameFactory::createGetOrder (  )  [virtual]

Creates a GetOrder Frame.

Returns:
A new GetOrder Frame.

References pver, and TPProto::Frame::setProtocolVersion().

GetOrderDescription * TPProto::FrameFactory::createGetOrderDescription (  )  [virtual]
GetOrderTypesList * TPProto::FrameFactory::createGetOrderTypesList (  )  [virtual]
GetPlayer * TPProto::FrameFactory::createGetPlayer (  )  [virtual]
GetPlayerIdsList * TPProto::FrameFactory::createGetPlayerIdsList (  )  [virtual]
GetProperty * TPProto::FrameFactory::createGetProperty (  )  [virtual]
GetPropertyIdsList * TPProto::FrameFactory::createGetPropertyIdsList (  )  [virtual]
GetResourceDescription * TPProto::FrameFactory::createGetResourceDescription (  )  [virtual]

Creates a GetResoureceDescription Frame.

Returns:
A new GetResourceDescription Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::ResourceCache::createGetByIdFrame().

GetResourceTypesList * TPProto::FrameFactory::createGetResourceTypesList (  )  [virtual]
GetTime * TPProto::FrameFactory::createGetTimeRemaining (  )  [virtual]

Creates a GetTimeRemaining Frame.

Returns:
A new GetTimeRemaining Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::GameLayer::getTimeRemaining().

Order * TPProto::FrameFactory::createInsertOrder (  )  [virtual]

Creates an InsertOrder Frame.

Returns:
A new InsertOrder Frame.

References createOrder().

Login * TPProto::FrameFactory::createLogin (  )  [virtual]
LogMessage * TPProto::FrameFactory::createLogMessage (  )  [virtual]
Message * TPProto::FrameFactory::createMessage (  )  [virtual]
ModifyDesign * TPProto::FrameFactory::createModifyDesign (  )  [virtual]
Object * TPProto::FrameFactory::createObject (  )  [virtual]

Creates an Object Frame.

Returns:
A new Object Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

ObjectDescription * TPProto::FrameFactory::createObjectDescription (  )  [virtual]

Creates an Object Description Frame.

Returns:
A new Object Description Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

ObjectIdsList * TPProto::FrameFactory::createObjectIdsList (  )  [virtual]
ObjectTypesList * TPProto::FrameFactory::createObjectTypesList (  )  [virtual]

Creates an Object Types List Frame.

Returns:
A new Object Types List Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

OkFrame * TPProto::FrameFactory::createOk (  )  [virtual]

Creates an OkFrame.

Returns:
A new OkFrame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

Order * TPProto::FrameFactory::createOrder (  )  [virtual]
OrderDescription * TPProto::FrameFactory::createOrderDescription (  )  [virtual]
OrderTypesList * TPProto::FrameFactory::createOrderTypesList (  )  [virtual]
Ping * TPProto::FrameFactory::createPing (  )  [virtual]

Creates a Ping Frame.

Returns:
A new Ping Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Player * TPProto::FrameFactory::createPlayer (  )  [virtual]

Creates a Player Frame.

Returns:
A new Player Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Referenced by TPProto::FrameBuilder::buildFrame().

PlayerIdsList * TPProto::FrameFactory::createPlayerIdsList (  )  [virtual]
Message * TPProto::FrameFactory::createPostMessage (  )  [virtual]

Creates a PostMessage Frame.

Returns:
A new PostMessage Frame.

References createMessage().

ProbeOrder * TPProto::FrameFactory::createProbeOrder (  )  [virtual]

Creates a ProbeOrder Frame.

Returns:
A new ProbeOrder Frame.

References pver, and TPProto::Frame::setProtocolVersion().

Property * TPProto::FrameFactory::createProperty (  )  [virtual]
PropertyIdsList * TPProto::FrameFactory::createPropertyIdsList (  )  [virtual]
Redirect * TPProto::FrameFactory::createRedirect (  )  [virtual]
RemoveCategory * TPProto::FrameFactory::createRemoveCategory (  )  [virtual]
RemoveDesign * TPProto::FrameFactory::createRemoveDesign (  )  [virtual]
RemoveMessage * TPProto::FrameFactory::createRemoveMessage (  )  [virtual]
RemoveOrder * TPProto::FrameFactory::createRemoveOrder (  )  [virtual]

Creates a RemoveOrder Frame.

Returns:
A new RemoveOrder Frame.

References pver, and TPProto::Frame::setProtocolVersion().

ResourceDescription * TPProto::FrameFactory::createResourceDescription (  )  [virtual]
ResourceTypesList * TPProto::FrameFactory::createResourceTypesList (  )  [virtual]
Sequence * TPProto::FrameFactory::createSequence (  )  [virtual]
SetFilters * TPProto::FrameFactory::createSetFilters (  )  [virtual]

Creates a Set Filters Frame.

Returns:
A new Set Filters Frame.

References pver, and TPProto::Frame::setProtocolVersion().

TimeRemaining * TPProto::FrameFactory::createTimeRemaining (  )  [virtual]
int TPProto::FrameFactory::getProtocolVersion (  )  const

Gets the protocol version.

Returns:
The protocol version number.

References pver.

Referenced by TPProto::GameLayer::finishedTurn().

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

Sets the ProtocolLayer.

This method sets the ProtocolLayer.

Parameters:
pl The ProtocolLayer to use.

References layer.

Referenced by TPProto::ProtocolLayer::ProtocolLayer(), and TPProto::ProtocolLayer::setFrameFactory().

void TPProto::FrameFactory::setProtocolVersion ( int  pv  ) 

Sets the protocol version the frames should have.

Parameters:
pv The protocol version number.

References pver.


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

Generated on Tue Mar 16 01:00:06 2010 for libtpproto-cpp by  doxygen 1.6.1