Eris
1.3.21
|
The out-of-game (OOG) heirarchy is composed of Rooms, containing Persons and other
Rooms. More...
#include <Room.h>
Public Member Functions | |
void | say (const std::string &tk) |
Send a piece of text to this room. | |
void | emote (const std::string &em) |
Send an emote ( /me ) to the room. More... | |
void | leave () |
Leave the room - no more signals will be emitted for this room again (validity of Room pointer after this call?) | |
Room * | createRoom (const std::string &name) |
create a child room of this one, with the specified name. More... | |
std::string | getName () const |
Obtain the human-readable name of this room. | |
std::string | getTopic () const |
std::vector< Person * > | getPeople () const |
obtain an array of pointers to everyone in this room | |
std::vector< Room * > | getRooms () const |
Obtain a list of rooms within this room. | |
std::string | getId () const |
Get the Atlas object ID of the Room; note that this may return an empty value if called prior to entering the Lobby | |
Person * | getPersonByUID (const std::string &uid) |
![]() | |
virtual RouterResult | handleObject (const Atlas::Objects::Root &obj) |
virtual RouterResult | handleEntity (const Atlas::Objects::Entity::RootEntity &ent) |
Public Attributes | |
sigc::signal< void, Room * > | Entered |
Emitted when entry into the room (after a Join) is complete, i.e the user list has been transferred and resolved. More... | |
sigc::signal< void, Room *, Person *, const std::string & > | Speech |
The primary talk callback. More... | |
sigc::signal< void, Room *, Person *, const std::string & > | Emote |
Emote (/me) callback. More... | |
sigc::signal< void, Room *, Person * > | Appearance |
Emitted when a person enters the room; argument is the account ID. More... | |
sigc::signal< void, Room *, Person * > | Disappearance |
Similarly, emitted when the specifed person leaves the room. | |
Protected Types | |
typedef std::map< std::string, Person * > | IdPersonMap |
Protected Member Functions | |
Room (Lobby *l, const std::string &id) | |
standard constructor. More... | |
virtual RouterResult | handleOperation (const Atlas::Objects::Operation::RootOperation &op) |
void | handleSoundTalk (Person *p, const std::string &speech) |
void | handleEmote (Person *p, const std::string &desc) |
Protected Attributes | |
std::string | m_roomId |
Friends | |
class | Lobby |
Additional Inherited Members | |
![]() | |
enum | RouterResult { IGNORED = 0, HANDLED, WILL_REDISPATCH } |
The out-of-game (OOG) heirarchy is composed of Rooms, containing Persons and other
Rooms.
Generally rooms corespond to chanels in IRC, and the interface and commands should be clear if you are familiar with that medium.
|
explicitprotected |
standard constructor.
Issues a LOOK against the specified ID, and sets up the necessary signals to drive the Room if id arg is provided
References Eris::Lobby::getConnection().
Room * Eris::Room::createRoom | ( | const std::string & | name | ) |
create a child room of this one, with the specified name.
Note that most attributes, including the ID will not be valid until the new room emits the 'Entered' signal. If you need a unique, referenceable indentifier earlier than that point, use the pointer value.
References Eris::Lobby::getAccount(), Eris::Lobby::getConnection(), Eris::Account::getId(), Eris::BaseConnection::isConnected(), and Eris::Connection::send().
void Eris::Room::emote | ( | const std::string & | em | ) |
Send an emote ( /me ) to the room.
This is transmitted as an IMAGINARY op in Atlas, with args[0]["id"] = "emote".
References Eris::Lobby::getAccount(), Eris::Lobby::getConnection(), Eris::Account::getId(), Eris::BaseConnection::isConnected(), and Eris::Connection::send().
Emitted when a person enters the room; argument is the account ID.
Note that Appearance is not generated for the local player when entering/leaving; use the Entered signal instead.
Emote (/me) callback.
The arguments are identical to those for Talk above
sigc::signal<void, Room*> Eris::Room::Entered |
Emitted when entry into the room (after a Join) is complete, i.e the user list has been
transferred and resolved.
The primary talk callback.
The arguments are the source room, the person talking, and the message itself