TPProto::AddDesign Class Reference

A Frame to hold AddDesigns frames to send to the server. More...

#include <adddesign.h>

Inheritance diagram for TPProto::AddDesign:

TPProto::Frame List of all members.

Public Member Functions

 AddDesign ()
 Default constructor.
virtual ~AddDesign ()
 Required virtual destructor.
void packBuffer (Buffer *buf)
 Pack into a Buffer.
bool unpackBuffer (Buffer *buf)
 Unpack from a Buffer, fails. Unpacks the AddDesign frame from the buffer. This method always fails and return false because you can't receive AddDesign frames from the server.
void setCategories (std::set< uint32_t > cats)
 Sets the categories this Design is in.
void setName (const std::string &n)
 Sets the name of this Design.
void setDescription (const std::string &d)
 Sets the description of this Design.
void setPlayerOwner (uint32_t player)
 Sets the Player that owns this Design. Should be the current player's id.
void setComponents (std::map< uint32_t, uint32_t > comps)
 Sets the components that make up this design.
void copyFromDesign (Design *d)
 Copies the contents of a design to add to the server.

Detailed Description

A Frame to hold AddDesigns frames to send to the server.


Member Function Documentation

void TPProto::AddDesign::packBuffer ( Buffer buf  )  [virtual]

Pack into a Buffer.

Packs this AddDesign frame into the buffer.

Parameters:
buf Buffer to pack into.

Implements TPProto::Frame.

bool TPProto::AddDesign::unpackBuffer ( Buffer buf  )  [virtual]

Unpack from a Buffer, fails. Unpacks the AddDesign frame from the buffer. This method always fails and return false because you can't receive AddDesign frames from the server.

Parameters:
buf The Buffer to unpack out of, ignored.
Returns:
False always.

Implements TPProto::Frame.

void TPProto::AddDesign::setCategories ( std::set< uint32_t >  cats  ) 

Sets the categories this Design is in.

Parameters:
cats The set of categories.

void TPProto::AddDesign::setName ( const std::string &  n  ) 

Sets the name of this Design.

Parameters:
n The name of the Design.

void TPProto::AddDesign::setDescription ( const std::string &  d  ) 

Sets the description of this Design.

Parameters:
d The description of the Design.

void TPProto::AddDesign::setPlayerOwner ( uint32_t  player  ) 

Sets the Player that owns this Design. Should be the current player's id.

Parameters:
player The Player id of the owner.

void TPProto::AddDesign::setComponents ( std::map< uint32_t, uint32_t >  comps  ) 

Sets the components that make up this design.

Parameters:
comps The map of component ids and the number in this design.

void TPProto::AddDesign::copyFromDesign ( Design d  ) 

Copies the contents of a design to add to the server.

Parameters:
d The design to copy from.


The documentation for this class was generated from the following files:
Generated on Tue Jan 6 06:45:53 2009 for libtpproto-cpp by  doxygen 1.5.1