#include <frame.h>
Inheritance diagram for TPProto::Frame:

Public Member Functions | |
| virtual | ~Frame () |
| Standard virtual default destructor. | |
| virtual void | packBuffer (Buffer *buf)=0 |
| Virtual method for packing this Frame into a Buffer. | |
| virtual bool | unpackBuffer (Buffer *buf)=0 |
| Virtual method for unpacking this Frame from a Buffer. | |
| void | setProtocolVersion (int ver) |
| Sets the protocol version number. | |
| int | getProtocolVersion () |
| Gets the protocol version number. | |
| void | setSequenceNumber (unsigned int seq) |
| Sets the sequence number to use. | |
| unsigned int | getSequenceNumber () |
| Gets the sequence number used. | |
| int | getType () |
| Gets the type number for this frame. | |
Protected Attributes | |
| int | protoVer |
| The protocol version. | |
| int | seqnum |
| The sequence number. | |
| int | type |
| The type of this Frame. | |
Frame is the basic message sent to and from the server. It stores the current protocol version number, the sequence number of the frame and the type.
| virtual void TPProto::Frame::packBuffer | ( | Buffer * | buf | ) | [pure virtual] |
Virtual method for packing this Frame into a Buffer.
This method must be overridden by all subclasses. Some subclasses may make a call to assert(0) if they should not be sent to the server.
| buf | The Buffer to pack into. |
Implemented in TPProto::AddCategory, TPProto::AddDesign, TPProto::Board, TPProto::Category, TPProto::Command, TPProto::CommandDescription, TPProto::CommandResult, TPProto::Component, TPProto::Connect, TPProto::AccountCreate, TPProto::Design, TPProto::FailFrame, TPProto::Features, TPProto::FinishedFrame, TPProto::GameInfo, TPProto::GetBoardIdsList, TPProto::GetById, TPProto::GetCategoryIdsList, TPProto::GetCommandTypesList, TPProto::GetComponentIdsList, TPProto::GetDesignIdsList, TPProto::GetFeatures, TPProto::GetGameInfo, TPProto::GetIdSequence, TPProto::GetMessage, TPProto::GetObjectByPos, TPProto::GetObjectIdsByContainer, TPProto::GetObjectIdsByPos, TPProto::GetObjectIdsList, TPProto::GetObjectTypesList, TPProto::GetOrder, TPProto::GetOrderTypesList, TPProto::GetPropertyIdsList, TPProto::GetResourceTypesList, TPProto::GetTime, TPProto::IdSequence, TPProto::Login, TPProto::LogMessage, TPProto::Message, TPProto::ModifyDesign, TPProto::Object, TPProto::ObjectDescription, TPProto::OkFrame, TPProto::Order, TPProto::OrderDescription, TPProto::Ping, TPProto::Player, TPProto::ProbeOrder, TPProto::Property, TPProto::Redirect, TPProto::RemoveCategory, TPProto::RemoveDesign, TPProto::RemoveMessage, TPProto::RemoveOrder, TPProto::ResourceDescription, TPProto::Sequence, TPProto::SetFilters, and TPProto::TimeRemaining.
| virtual bool TPProto::Frame::unpackBuffer | ( | Buffer * | buf | ) | [pure virtual] |
Virtual method for unpacking this Frame from a Buffer.
This method must be overridden by all subclasses. Some subclasses may always return false if they should never be received from the server.
| buf | The Buffer to unpack out of. |
Implemented in TPProto::AddCategory, TPProto::AddDesign, TPProto::Board, TPProto::BoardIdsList, TPProto::Category, TPProto::CategoryIdsList, TPProto::Command, TPProto::CommandDescription, TPProto::CommandResult, TPProto::CommandTypesList, TPProto::Component, TPProto::ComponentIdsList, TPProto::Connect, TPProto::AccountCreate, TPProto::Design, TPProto::DesignIdsList, TPProto::FailFrame, TPProto::Features, TPProto::FinishedFrame, TPProto::Fleet, TPProto::GameInfo, TPProto::GetById, TPProto::GetFeatures, TPProto::GetGameInfo, TPProto::GetIdSequence, TPProto::GetMessage, TPProto::GetObjectByPos, TPProto::GetObjectIdsByContainer, TPProto::GetObjectIdsByPos, TPProto::GetOrder, TPProto::GetTime, TPProto::IdSequence, TPProto::Login, TPProto::LogMessage, TPProto::Message, TPProto::ModifyDesign, TPProto::Object, TPProto::ObjectDescription, TPProto::ObjectIdsList, TPProto::ObjectTypesList, TPProto::OkFrame, TPProto::Order, TPProto::OrderDescription, TPProto::OrderTypesList, TPProto::Ping, TPProto::Planet, TPProto::Player, TPProto::ProbeOrder, TPProto::Property, TPProto::PropertyIdsList, TPProto::Redirect, TPProto::RemoveCategory, TPProto::RemoveDesign, TPProto::RemoveMessage, TPProto::RemoveOrder, TPProto::ResourceDescription, TPProto::ResourceTypesList, TPProto::Sequence, TPProto::SetFilters, TPProto::TimeRemaining, and TPProto::Universe.
| void TPProto::Frame::setProtocolVersion | ( | int | ver | ) |
Sets the protocol version number.
| ver | The version number to use. |
| int TPProto::Frame::getProtocolVersion | ( | ) |
Gets the protocol version number.
| void TPProto::Frame::setSequenceNumber | ( | unsigned int | seq | ) |
Sets the sequence number to use.
| seq | The sequence number. |
| unsigned int TPProto::Frame::getSequenceNumber | ( | ) |
Gets the sequence number used.
| int TPProto::Frame::getType | ( | ) |
Gets the type number for this frame.
This value should be in the FrameType enum.
int TPProto::Frame::type [protected] |
The type of this Frame.
Should always be in the FrameType enum.
1.5.1