Atlas_Objects_Entity_AccountData

Langue: en

Version: 151155 (fedora - 04/07/09)

Section: 3 (Bibliothèques de fonctions)

NAME

Atlas::Objects::Entity::AccountData - Base class for accounts.

SYNOPSIS


#include <Entity.h>

Inherits Atlas::Objects::Entity::AdminEntityData.

Inherited by Atlas::Objects::Entity::AdminData, and Atlas::Objects::Entity::PlayerData.

Public Member Functions


virtual AccountData * copy () const
Copy this object.
virtual bool instanceOf (int classNo) const
Is this instance of some class?
virtual int copyAttr (const std::string &name, Atlas::Message::Element &attr) const
Retrieve the attribute 'name'.
virtual void setAttr (const std::string &name, const Atlas::Message::Element &attr)
Set the attribute 'name' to the value given by'attr'.
virtual void removeAttr (const std::string &name)
Remove the attribute 'name'. This will not work for static attributes.
virtual void sendContents (Atlas::Bridge &b) const
Send the contents of this object to a Bridge.
virtual void addToMessage (Atlas::Message::MapType &) const
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?
virtual void free ()
Free an instance of this class, returning it to the memory pool.
virtual AccountData * getDefaultObject ()
Get the reference object that contains the default values for attributes of instances of the same class as this object.

Static Public Member Functions


static AccountData * alloc ()
Allocate a new instance of this class, using an existing instance if available.
static AccountData * getDefaultObjectInstance ()
Get the reference object that contains the default values for attributes of instances of this class.

Protected Member Functions


AccountData (AccountData *defaults=NULL)
Construct a AccountData class definition.
virtual ~AccountData ()
Default destructor.
virtual int getAttrClass (const std::string &name) const
Find the class which contains the attribute 'name'.
virtual int getAttrFlag (const std::string &name) const
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.
virtual void iterate (int &current_class, std::string &attr) const
Iterate over the attributes of this instance.

Protected Attributes


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.

Detailed Description

Base class for accounts.

Later in hierarchy tree objtype changes to 'object' when actual game objects are made.

Member Function Documentation

static AccountData* Atlas::Objects::Entity::AccountData::alloc () [static]

Allocate a new instance of this class, using an existing instance if available.

This is the key function for implementing the memory pool for the Atlas::Objects API.

Reimplemented from Atlas::Objects::Entity::AdminEntityData.

Reimplemented in Atlas::Objects::Entity::PlayerData, and Atlas::Objects::Entity::AdminData.

virtual int Atlas::Objects::Entity::AccountData::copyAttr (const std::string & name, Atlas::Message::Element & attr) const [virtual]

Retrieve the attribute 'name'.

Return non-zero if it does not exist.

Reimplemented from Atlas::Objects::Entity::RootEntityData.

virtual void Atlas::Objects::Entity::AccountData::free () [virtual]

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::AdminEntityData.

Reimplemented in Atlas::Objects::Entity::PlayerData, and Atlas::Objects::Entity::AdminData.

virtual AccountData* Atlas::Objects::Entity::AccountData::getDefaultObject () [virtual]

Get the reference object that contains the default values for attributes of instances of the same class as this object.

Returns:

a pointer to the default object.

Reimplemented from Atlas::Objects::Entity::AdminEntityData.

Reimplemented in Atlas::Objects::Entity::PlayerData, and Atlas::Objects::Entity::AdminData.

static AccountData* Atlas::Objects::Entity::AccountData::getDefaultObjectInstance () [static]

Get the reference object that contains the default values for attributes of instances of this class.

Returns:

a pointer to the default object.

Reimplemented from Atlas::Objects::Entity::AdminEntityData.

Reimplemented in Atlas::Objects::Entity::PlayerData, and Atlas::Objects::Entity::AdminData.

Author

Generated automatically by Doxygen for Atlas-C++ from the source code.