TPProto::Design Class Reference

A Frame to hold Designs from the server. More...

#include <design.h>

Inheritance diagram for TPProto::Design:

TPProto::Frame List of all members.

Public Member Functions

 Design ()
 Default constructor.
virtual ~Design ()
 Required virtual destructor.
void packBuffer (Buffer *buf)
 Pack into a Buffer, asserts.
bool unpackBuffer (Buffer *buf)
 Unpack from a Buffer. Unpacks the Design frame from the buffer.
uint32_t getDesignId () const
 Gets the Design id.
uint64_t getModTime () const
 Gets the last modification time of this Design.
std::set< uint32_t > getCategories () const
 Gets the categories this Design is in.
std::string getName () const
 Gets the name of this Design.
std::string getDescription () const
 Gets the description of this Design.
uint32_t getNumInUse () const
 Gets the number of times this design is in use. If is 0xffffffff (ie, -1), then the design is not currently usable.
uint32_t getPlayerOwner () const
 Gets the Player that owns this Design. Can be 0xffffffff (ie, -1) if the owner is not known.
std::map< uint32_t, uint32_t > getComponents () const
 Gets the components that make up this design.
std::string getDesignFeedback () const
 Gets the feedback on the design.
std::map< uint32_t, std::string > getPropertyValues () const
 Gets the property values of this design.

Detailed Description

A Frame to hold Designs from the server.


Member Function Documentation

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

Pack into a Buffer, asserts.

Packs this Design frame into the buffer. Since the frame only comes from the server, this method assert(0).

Parameters:
buf Buffer to pack into, ignored.

Implements TPProto::Frame.

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

Unpack from a Buffer. Unpacks the Design frame from the buffer.

Parameters:
buf The Buffer to unpack out of.
Returns:
True if sucessful, false otherwise.

Implements TPProto::Frame.

uint32_t TPProto::Design::getDesignId (  )  const

Gets the Design id.

Returns:
The Design id number.

uint64_t TPProto::Design::getModTime (  )  const

Gets the last modification time of this Design.

Returns:
The modtime.

std::set< uint32_t > TPProto::Design::getCategories (  )  const

Gets the categories this Design is in.

Returns:
The set of categories.

std::string TPProto::Design::getName (  )  const

Gets the name of this Design.

Returns:
The name of the Design.

std::string TPProto::Design::getDescription (  )  const

Gets the description of this Design.

Returns:
The description of the Design.

uint32_t TPProto::Design::getNumInUse (  )  const

Gets the number of times this design is in use. If is 0xffffffff (ie, -1), then the design is not currently usable.

Returns:
The number of times the design is in use.

uint32_t TPProto::Design::getPlayerOwner (  )  const

Gets the Player that owns this Design. Can be 0xffffffff (ie, -1) if the owner is not known.

Returns:
The Player id of the owner.

std::map< uint32_t, uint32_t > TPProto::Design::getComponents (  )  const

Gets the components that make up this design.

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

std::string TPProto::Design::getDesignFeedback (  )  const

Gets the feedback on the design.

Returns:
The feedback.

std::map< uint32_t, std::string > TPProto::Design::getPropertyValues (  )  const

Gets the property values of this design.

Returns:
The map of property value id and string display value.


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