Eris  1.4.0
Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
Eris::Lobby Class Reference

Lobby is the Out-of-Game session object, valid from connection to the server until disconnection. More...

#include <Lobby.h>

Inheritance diagram for Eris::Lobby:
Eris::Room Eris::Router

Public Member Functions

 Lobby (Account *acc)
 Create a Lobby for the specified account, and retrive the initial OOG structure if the Account is logged in and connected. More...
 
virtual ~Lobby ()
 Delete the Lobby, including all it's Rooms and Persons. More...
 
Roomjoin (const std::string &roomID)
 Join the specified room, or return NULL if an error occurs. More...
 
PersongetPerson (const std::string &acc)
 obtain a person's info, given their account ID; may return NULL
 
RoomgetRoom (const std::string &id)
 Obtain a Room object, given the rooms' id. More...
 
AccountgetAccount () const
 Retrive the Account which this lobbby is bound to.
 
ConnectiongetConnection () const
 Helper method to access the underlying Connection from the Account.
 
- Public Member Functions inherited from Eris::Room
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?)
 
RoomcreateRoom (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.
 
PersongetPersonByUID (const std::string &uid)
 
- Public Member Functions inherited from Eris::Router
virtual RouterResult handleObject (const Atlas::Objects::Root &obj)
 
virtual RouterResult handleEntity (const Atlas::Objects::Entity::RootEntity &ent)
 

Public Attributes

sigc::signal< void, Person * > SightPerson
 Emitted when sight of a person is received.
 
sigc::signal< void, Person *, const std::string & > PrivateTalk
 Emitted when some person sends a private (one-to-one) chat message to the client's account. More...
 
- Public Attributes inherited from Eris::Room
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 Member Functions

void look (const std::string &id)
 
void sightPerson (const Atlas::Objects::Entity::Account &ac)
 
Router::RouterResult recvTalk (const Atlas::Objects::Operation::Talk &tk)
 
void recvInitialSight (const Atlas::Objects::Entity::RootEntity &ent)
 
void recvAppearance (const Atlas::Objects::Root &obj)
 
void recvDisappearance (const Atlas::Objects::Root &obj)
 
Router::RouterResult recvImaginary (const Atlas::Objects::Operation::Imaginary &im)
 
- Protected Member Functions inherited from Eris::Room
 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)
 

Friends

class Room
 
class OOGRouter
 

Additional Inherited Members

- Public Types inherited from Eris::Router
enum  RouterResult { IGNORED = 0, HANDLED, WILL_REDISPATCH }
 
- Protected Types inherited from Eris::Room
typedef std::unordered_map< std::string, Person * > IdPersonMap
 
- Protected Attributes inherited from Eris::Room
std::string m_roomId
 

Detailed Description

Lobby is the Out-of-Game session object, valid from connection to the server until disconnection.

It manages the entire OOG structure, which consists of rooms and people. People can be in more than one room (this is the big difference to in-game). Note the entire OOG system remains live and valid even when an Avatar is active, it's up to the client to present some UI for accessing the OOG system if it wants.

Of course, nothing requries to create a Lobby at all, Account and the in-game structure will work perfectly well without one.

Constructor & Destructor Documentation

◆ Lobby()

Eris::Lobby::Lobby ( Account acc)

Create a Lobby for the specified account, and retrive the initial OOG structure if the Account is logged in and connected.

References Eris::Account::isLoggedIn(), Eris::Account::LoginSuccess, and Eris::Account::LogoutComplete.

◆ ~Lobby()

Eris::Lobby::~Lobby ( )
virtual

Delete the Lobby, including all it's Rooms and Persons.

References getConnection(), Eris::Account::getId(), Eris::getNewSerialno(), Eris::Account::isLoggedIn(), and Eris::Connection::send().

Member Function Documentation

◆ getRoom()

Room * Eris::Lobby::getRoom ( const std::string &  id)

Obtain a Room object, given the rooms' id.

This will return NULL if the id is invalid.

References Eris::Account::getConnection(), and SightPerson.

◆ join()

Room * Eris::Lobby::join ( const std::string &  roomID)

Join the specified room, or return NULL if an error occurs.

Note the Room will not be valid until it emits the Entered signal.

References getConnection(), Eris::Account::getId(), Eris::getNewSerialno(), Eris::Account::isLoggedIn(), and Eris::Connection::send().

Member Data Documentation

◆ PrivateTalk

sigc::signal<void, Person*, const std::string&> Eris::Lobby::PrivateTalk

Emitted when some person sends a private (one-to-one) chat message to the client's account.

The first argument is the sender, which will always be a valid Person object, and the second is the message text.


The documentation for this class was generated from the following files: