4 #include <Eris/Router.h>
6 #include <sigc++/trackable.h>
7 #include <sigc++/signal.h>
30 void say(
const std::string &tk);
34 void emote(
const std::string &em);
52 std::string getTopic()
const
73 Person* getPersonByUID(
const std::string& uid);
82 sigc::signal<void, Room*, Person*, const std::string&>
Speech;
85 sigc::signal<void, Room*, Person*, const std::string&>
Emote;
99 typedef std::map<std::string, Person*> IdPersonMap;
103 explicit Room(
Lobby *l,
const std::string&
id);
105 virtual RouterResult handleOperation(
const Atlas::Objects::Operation::RootOperation& op);
106 void handleSoundTalk(
Person* p,
const std::string& speech);
107 void handleEmote(
Person* p,
const std::string& desc);
110 std::string m_roomId;
115 void sight(
const Atlas::Objects::Entity::RootEntity &room);
117 void appearance(
const std::string& personId);
118 void disappearance(
const std::string& personId);
121 void notifyPersonSight(
Person *p);
128 IdPersonMap m_members;
130 std::vector<Room*> m_subrooms;
sigc::signal< void, Room *, Person * > Appearance
Emitted when a person enters the room; argument is the account ID.
Definition: Room.h:90
const std::string & getId() const
returns the account ID if logged in
Definition: Account.h:318
Lobby is the Out-of-Game session object, valid from connection to the server until disconnection.
Definition: Lobby.h:25
The out-of-game (OOG) heirarchy is composed of Rooms, containing Persons and other Rooms.
Definition: Room.h:24
sigc::signal< void, Room *, Person *, const std::string & > Emote
Emote (/me) callback.
Definition: Room.h:85
sigc::signal< void, Person * > SightPerson
Emitted when sight of a person is received.
Definition: Lobby.h:59
Person * getPerson(const std::string &acc)
obtain a person's info, given their account ID; may return NULL
Definition: Lobby.cpp:193
sigc::signal< void, Room *, Person *, const std::string & > Speech
The primary talk callback.
Definition: Room.h:82
void leave()
Leave the room - no more signals will be emitted for this room again (validity of Room pointer after ...
Definition: Room.cpp:91
An Out-of-Game Person (found in a Room / Lobby) As more person data becomes available,...
Definition: Person.h:15
std::string getId() const
Get the Atlas object ID of the Room; note that this may return an empty value if called prior to ente...
Definition: Room.h:68
std::string getName() const
Obtain the human-readable name of this room.
Definition: Room.h:47
Room * createRoom(const std::string &name)
create a child room of this one, with the specified name.
Definition: Room.cpp:111
abstract interface for objects that can route Atlas data.
Definition: Router.h:10
Definition: LogStream.h:55
bool isConnected() const
Ascertain whether or not the connection is usable for transport.
Definition: BaseConnection.h:65
void say(const std::string &tk)
Send a piece of text to this room.
Definition: Room.cpp:47
std::vector< Room * > getRooms() const
Obtain a list of rooms within this room.
Definition: Room.h:61
Room(Lobby *l, const std::string &id)
standard constructor.
Definition: Room.cpp:29
Account * getAccount() const
Retrive the Account which this lobbby is bound to.
Definition: Lobby.h:49
sigc::signal< void, Room * > Entered
Emitted when entry into the room (after a Join) is complete, i.e the user list has been transferred a...
Definition: Room.h:78
virtual void send(const Atlas::Objects::Root &obj)
Transmit an Atlas::Objects instance to the server.
Definition: Connection.cpp:147
void emote(const std::string &em)
Send an emote ( /me ) to the room.
Definition: Room.cpp:68
sigc::signal< void, Room *, Person * > Disappearance
Similarly, emitted when the specifed person leaves the room.
Definition: Room.h:93
std::vector< Person * > getPeople() const
obtain an array of pointers to everyone in this room
Definition: Room.cpp:140
Connection * getConnection() const
Helper method to access the underlying Connection from the Account.
Definition: Lobby.cpp:188