6 #include <sigc++/trackable.h> 7 #include <sigc++/signal.h> 10 #include <unordered_map> 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::unordered_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;
Room(Lobby *l, const std::string &id)
standard constructor.
Definition: Room.cpp:29
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
sigc::signal< void, Room *, Person *, const std::string & > Emote
Emote (/me) callback.
Definition: Room.h:85
std::string getName() const
Obtain the human-readable name of this room.
Definition: Room.h:47
void emote(const std::string &em)
Send an emote ( /me ) to the room.
Definition: Room.cpp:67
std::vector< Room * > getRooms() const
Obtain a list of rooms within this room.
Definition: Room.h:61
sigc::signal< void, Room *, Person * > Disappearance
Similarly, emitted when the specifed person leaves the room.
Definition: Room.h:93
Every Eris class and type lives inside the Eris namespace; certain utility functions live in the Util...
Definition: Account.cpp:34
sigc::signal< void, Room *, Person * > Appearance
Emitted when a person enters the room; argument is the account ID.
Definition: Room.h:90
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
sigc::signal< void, Room *, Person *, const std::string & > Speech
The primary talk callback.
Definition: Room.h:82
void say(const std::string &tk)
Send a piece of text to this room.
Definition: Room.cpp:46
void leave()
Leave the room - no more signals will be emitted for this room again (validity of Room pointer after ...
Definition: Room.cpp:90
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
std::vector< Person * > getPeople() const
obtain an array of pointers to everyone in this room
Definition: Room.cpp:139
An Out-of-Game Person (found in a Room / Lobby) As more person data becomes available, this class will be extended, for example to return nicknames, location, the choosen 'face' graphic.
Definition: Person.h:15
abstract interface for objects that can route Atlas data.
Definition: Router.h:10
Room * createRoom(const std::string &name)
create a child room of this one, with the specified name.
Definition: Room.cpp:110