Atlas-C++
|
Privileged accounts. More...
#include <Entity.h>
Public Member Functions | |
AdminData * | copy () const override |
Copy this object. | |
bool | instanceOf (int classNo) const override |
Is this instance of some class? | |
void | iterate (int ¤t_class, std::string &attr) const override |
Iterate over the attributes of this instance. | |
![]() | |
int | copyAttr (const std::string &name, Atlas::Message::Element &attr) const override |
Retrieve the attribute "name". More... | |
void | setAttr (const std::string &name, const Atlas::Message::Element &attr) override |
Set the attribute "name" to the value given by"attr". | |
void | removeAttr (const std::string &name) override |
Remove the attribute "name". This will not work for static attributes. | |
void | sendContents (Atlas::Bridge &b) const override |
Send the contents of this object to a Bridge. | |
void | addToMessage (Atlas::Message::MapType &) const override |
Write this object to an existing Element. | |
void | setUsername (const std::string &val) |
Set the "username" attribute. | |
void | setPassword (const std::string &val) |
Set the "password" attribute. | |
void | setCharacters (const std::list< std::string > &val) |
Set the "characters" attribute. | |
void | setCharactersAsList (const Atlas::Message::ListType &val) |
Set the "characters" attribute AsList. | |
const std::string & | getUsername () const |
Retrieve the "username" attribute. | |
std::string & | modifyUsername () |
Retrieve the "username" attribute as a non-const reference. | |
const std::string & | getPassword () const |
Retrieve the "password" attribute. | |
std::string & | modifyPassword () |
Retrieve the "password" attribute as a non-const reference. | |
const std::list< std::string > & | getCharacters () const |
Retrieve the "characters" attribute. | |
std::list< std::string > & | modifyCharacters () |
Retrieve the "characters" attribute as a non-const reference. | |
const Atlas::Message::ListType | getCharactersAsList () const |
Retrieve the "characters" attribute AsList. | |
bool | isDefaultUsername () const |
Is "username" value default? | |
bool | isDefaultPassword () const |
Is "password" value default? | |
bool | isDefaultCharacters () const |
Is "characters" value default? | |
![]() | |
RootEntityData * | copy () const override |
Copy this object. | |
bool | instanceOf (int classNo) const override |
Is this instance of some class? | |
int | copyAttr (const std::string &name, Atlas::Message::Element &attr) const override |
Retrieve the attribute "name". More... | |
void | setAttr (const std::string &name, const Atlas::Message::Element &attr) override |
Set the attribute "name" to the value given by"attr". | |
void | removeAttr (const std::string &name) override |
Remove the attribute "name". This will not work for static attributes. | |
void | sendContents (Atlas::Bridge &b) const override |
Send the contents of this object to a Bridge. | |
void | addToMessage (Atlas::Message::MapType &) const override |
Write this object to an existing Element. | |
void | setLoc (const std::string &val) |
Set the "loc" attribute. | |
void | setPos (const std::vector< double > &val) |
Set the "pos" attribute. | |
void | setPosAsList (const Atlas::Message::ListType &val) |
Set the "pos" attribute AsList. | |
void | setVelocity (const std::vector< double > &val) |
Set the "velocity" attribute. | |
void | setVelocityAsList (const Atlas::Message::ListType &val) |
Set the "velocity" attribute AsList. | |
void | setContains (const std::list< std::string > &val) |
Set the "contains" attribute. | |
void | setContainsAsList (const Atlas::Message::ListType &val) |
Set the "contains" attribute AsList. | |
void | setStampContains (double val) |
Set the "stamp_contains" attribute. | |
const std::string & | getLoc () const |
Retrieve the "loc" attribute. | |
std::string & | modifyLoc () |
Retrieve the "loc" attribute as a non-const reference. | |
const std::vector< double > & | getPos () const |
Retrieve the "pos" attribute. | |
std::vector< double > & | modifyPos () |
Retrieve the "pos" attribute as a non-const reference. | |
const Atlas::Message::ListType | getPosAsList () const |
Retrieve the "pos" attribute AsList. | |
const std::vector< double > & | getVelocity () const |
Retrieve the "velocity" attribute. | |
std::vector< double > & | modifyVelocity () |
Retrieve the "velocity" attribute as a non-const reference. | |
const Atlas::Message::ListType | getVelocityAsList () const |
Retrieve the "velocity" attribute AsList. | |
const std::list< std::string > & | getContains () const |
Retrieve the "contains" attribute. | |
std::list< std::string > & | modifyContains () |
Retrieve the "contains" attribute as a non-const reference. | |
const Atlas::Message::ListType | getContainsAsList () const |
Retrieve the "contains" attribute AsList. | |
double | getStampContains () const |
Retrieve the "stamp_contains" attribute. | |
double & | modifyStampContains () |
Retrieve the "stamp_contains" attribute as a non-const reference. | |
bool | isDefaultLoc () const |
Is "loc" value default? | |
bool | isDefaultPos () const |
Is "pos" value default? | |
bool | isDefaultVelocity () const |
Is "velocity" value default? | |
bool | isDefaultContains () const |
Is "contains" value default? | |
bool | isDefaultStampContains () const |
Is "stamp_contains" value default? | |
![]() | |
void | setId (const std::string &val) |
Set the "id" attribute. | |
void | setParent (const std::string &val) |
Set the "parent" attribute. | |
void | setStamp (double val) |
Set the "stamp" attribute. | |
void | setObjtype (const std::string &val) |
Set the "objtype" attribute. | |
void | setName (const std::string &val) |
Set the "name" attribute. | |
const std::string & | getId () const |
Retrieve the "id" attribute. | |
std::string & | modifyId () |
Retrieve the "id" attribute as a non-const reference. | |
const std::string & | getParent () const |
Retrieve the "parent" attribute. | |
std::string & | modifyParent () |
Retrieve the "parent" attribute as a non-const reference. | |
double | getStamp () const |
Retrieve the "stamp" attribute. | |
double & | modifyStamp () |
Retrieve the "stamp" attribute as a non-const reference. | |
const std::string & | getObjtype () const |
Retrieve the "objtype" attribute. | |
std::string & | modifyObjtype () |
Retrieve the "objtype" attribute as a non-const reference. | |
const std::string & | getName () const |
Retrieve the "name" attribute. | |
std::string & | modifyName () |
Retrieve the "name" attribute as a non-const reference. | |
bool | isDefaultId () const |
Is "id" value default? | |
bool | isDefaultParent () const |
Is "parent" value default? | |
bool | isDefaultStamp () const |
Is "stamp" value default? | |
bool | isDefaultObjtype () const |
Is "objtype" value default? | |
bool | isDefaultName () const |
Is "name" value default? | |
![]() | |
BaseObjectData (BaseObjectData *defaults) | |
Construct a new BaseObjectData from a subclass. More... | |
int | getClassNo () const |
Get class number: | |
int32_t | getAttrFlags () const |
bool | hasAttr (const std::string &name) const |
Check whether the attribute "name" exists. | |
bool | hasAttrFlag (int flag) const |
Check whether the attribute "name" exists. | |
const Atlas::Message::Element | getAttr (const std::string &name) const |
Retrieve the attribute "name". More... | |
virtual void | removeAttrFlag (int flag) |
Remove the attribute "name". | |
Atlas::Message::MapType | asMessage () const |
Convert this object to a Object. More... | |
iterator | begin () |
iterator | end () |
iterator | find (const std::string &) |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | find (const std::string &) const |
Static Public Attributes | |
static Allocator< AdminData > | allocator |
![]() | |
static Allocator< AccountData > | allocator |
![]() | |
static Allocator< AdminEntityData > | allocator |
![]() | |
static Allocator< RootEntityData > | allocator |
![]() | |
static Allocator< RootData > | allocator |
Protected Member Functions | |
AdminData (AdminData *defaults=nullptr) | |
Construct a AdminData class definition. | |
~AdminData () override=default | |
Default destructor. | |
void | reset () override |
Resets the object as it's returned to the pool. | |
void | free () override |
Free an instance of this class, returning it to the memory pool. More... | |
![]() | |
AccountData (AccountData *defaults=nullptr) | |
Construct a AccountData class definition. | |
~AccountData () override=default | |
Default destructor. | |
int | getAttrClass (const std::string &name) const override |
Find the class which contains the attribute "name". | |
int32_t | getAttrFlag (const std::string &name) const override |
Find the flag for the attribute "name". | |
void | sendUsername (Atlas::Bridge &) const |
Send the "username" attribute to an Atlas::Bridge. | |
void | sendPassword (Atlas::Bridge &) const |
Send the "password" attribute to an Atlas::Bridge. | |
void | sendCharacters (Atlas::Bridge &) const |
Send the "characters" attribute to an Atlas::Bridge. | |
![]() | |
AdminEntityData (AdminEntityData *defaults=nullptr) | |
Construct a AdminEntityData class definition. | |
~AdminEntityData () override=default | |
Default destructor. | |
![]() | |
RootEntityData (RootEntityData *defaults=nullptr) | |
Construct a RootEntityData class definition. | |
~RootEntityData () override=default | |
Default destructor. | |
int | getAttrClass (const std::string &name) const override |
Find the class which contains the attribute "name". | |
int32_t | getAttrFlag (const std::string &name) const override |
Find the flag for the attribute "name". | |
void | sendLoc (Atlas::Bridge &) const |
Send the "loc" attribute to an Atlas::Bridge. | |
void | sendPos (Atlas::Bridge &) const |
Send the "pos" attribute to an Atlas::Bridge. | |
void | sendVelocity (Atlas::Bridge &) const |
Send the "velocity" attribute to an Atlas::Bridge. | |
void | sendContains (Atlas::Bridge &) const |
Send the "contains" attribute to an Atlas::Bridge. | |
void | sendStampContains (Atlas::Bridge &) const |
Send the "stamp_contains" attribute to an Atlas::Bridge. | |
void | iterate (int ¤t_class, std::string &attr) const override |
Iterate over the attributes of this instance. | |
void | reset () override |
Resets the object as it's returned to the pool. | |
void | free () override |
Free an instance of this class, returning it to the memory pool. More... | |
![]() | |
RootData (RootData *defaults=nullptr) | |
Construct a RootData class definition. | |
~RootData () override=default | |
Default destructor. | |
void | sendId (Atlas::Bridge &) const |
Send the "id" attribute to an Atlas::Bridge. | |
void | sendParent (Atlas::Bridge &) const |
Send the "parent" attribute to an Atlas::Bridge. | |
void | sendStamp (Atlas::Bridge &) const |
Send the "stamp" attribute to an Atlas::Bridge. | |
void | sendObjtype (Atlas::Bridge &) const |
Send the "objtype" attribute to an Atlas::Bridge. | |
void | sendName (Atlas::Bridge &) const |
Send the "name" attribute to an Atlas::Bridge. | |
![]() | |
void | incRef () |
void | decRef () |
Friends | |
template<typename > | |
class | ::Atlas::Objects::Allocator |
Additional Inherited Members | |
![]() | |
std::string | attr_username |
Username for account usually. | |
std::string | attr_password |
Password for account usually. | |
std::list< std::string > | attr_characters |
List of characters account can control. | |
![]() | |
std::string | attr_loc |
Reference object for coordinates (location). | |
std::vector< double > | attr_pos |
Position coordinates, usually world is 3D. | |
std::vector< double > | attr_velocity |
Velocity object is moving, usually world is 3D. | |
std::list< std::string > | attr_contains |
List of objects that use this object as reference system (usually same as what this object contains). | |
double | attr_stamp_contains |
Last time any object that uses this as reference recursively has been modified. | |
![]() | |
std::string | attr_id |
Id of object. | |
std::string | attr_parent |
The object this inherits attributes from. | |
double | attr_stamp |
Last time this object was modified. | |
std::string | attr_objtype |
What kind of object this is. | |
std::string | attr_name |
Name of object. | |
![]() | |
int | m_class_no |
int | m_refCount |
BaseObjectData * | m_defaults |
The default instance, acting as a prototype for all other instances. | |
BaseObjectData * | m_next |
The next instance, if this instance has been freed up. | |
std::map< std::string, Atlas::Message::Element > | m_attributes |
int32_t | m_attrFlags |
Privileged accounts.
Later in hierarchy tree objtype changes to 'object' when actual game objects are made.
|
overrideprotectedvirtual |
Free an instance of this class, returning it to the memory pool.
This function in combination with alloc() handle the memory pool.
Reimplemented from Atlas::Objects::Entity::AccountData.
Copyright 2000-2004 the respective authors.
This document can be licensed under the terms of the GNU Free Documentation License or the GNU General Public License and may be freely distributed under the terms given by one of these licenses.