#include <object.h>
Inheritance diagram for TPProto::Object:

Public Member Functions | |
| Object () | |
| ~Object () | |
| Required destructor. | |
| void | packBuffer (Buffer *buf) |
| Asserts(0). | |
| bool | unpackBuffer (Buffer *buf) |
| Unpacks the standard Object fields from the Buffer. | |
| uint32_t | getId () |
| Gets the Object's id number. | |
| std::string | getName () |
| Gets the Object's name. | |
| std::string | getDescription () |
| Gets the Object's description. | |
| uint32_t | getObjectType () |
| Gets the object type number of the object. | |
| uint32_t | getParentId () |
| Gets the Parent object's Id. | |
| std::set< uint32_t > | getContainedObjectIds () |
| Gets the set of contained objectids. | |
| uint64_t | getLastModifiedTime () |
| Gets the last time this object was modified. | |
| void | setObjectType (boost::shared_ptr< ObjectDescription > od) |
| Sets the ObjectDescription this Object should use. Must be set before calling unpackBuffer. | |
Protected Attributes | |
| uint32_t | id |
| The Object's Id. | |
| boost::shared_ptr< ObjectDescription > | obtype |
| The ObjectDescription for this object. | |
| std::string | name |
| The object's name. | |
| std::string | description |
| uint32_t | parent |
| std::set< uint32_t > | contained |
| The set of objectids that this object contains. | |
| uint64_t | modtime |
| The last modification time of this object. | |
All Objects in the game are instances of this class. Parameters from the ObjectDescription are used to give the type of this object.
| TPProto::Object::Object | ( | ) |
Constructor.
| void TPProto::Object::packBuffer | ( | Buffer * | buf | ) | [virtual] |
Asserts(0).
Thie method asserts zero because it should never be sent to the server. /param buf The Buffer (ignored).
Implements TPProto::Frame.
| bool TPProto::Object::unpackBuffer | ( | Buffer * | buf | ) | [virtual] |
Unpacks the standard Object fields from the Buffer.
Everything except the ObjectType specific data is unpacked. /param buf The Buffer the Object is to be unpacked from.
Implements TPProto::Frame.
Reimplemented in TPProto::Fleet, TPProto::Planet, and TPProto::Universe.
| uint32_t TPProto::Object::getId | ( | ) |
Gets the Object's id number.
| std::string TPProto::Object::getName | ( | ) |
Gets the Object's name.
| std::string TPProto::Object::getDescription | ( | ) |
Gets the Object's description.
| uint32_t TPProto::Object::getObjectType | ( | ) |
Gets the object type number of the object.
| uint32_t TPProto::Object::getParentId | ( | ) |
Gets the Parent object's Id.
| std::set< uint32_t > TPProto::Object::getContainedObjectIds | ( | ) |
Gets the set of contained objectids.
| uint64_t TPProto::Object::getLastModifiedTime | ( | ) |
Gets the last time this object was modified.
| void TPProto::Object::setObjectType | ( | boost::shared_ptr< ObjectDescription > | od | ) |
Sets the ObjectDescription this Object should use. Must be set before calling unpackBuffer.
| od | The ObjectDescription. |
std::string TPProto::Object::description [protected] |
The object's description.
uint32_t TPProto::Object::parent [protected] |
The object's parent objectid.
1.5.1