Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

Eris::Room Class Reference

The out-of-game (OOG) heirarchy is composed of Rooms, containing Persons and other Rooms. More...

#include <Room.h>

Inheritance diagram for Eris::Room:

Eris::Lobby List of all members.

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.

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.

const std::string & getName () const
 Obtain the human-readable name of this room.

StringList getPeople () const
 Obtain a list of the account IDs of each person in this room.

StringList getRooms () const
 Obtain a list of rooms within this room.

const std::string & getID () const
 Get the Atlas object ID of the Room; note this can fail prior to the Entered signal being emitted; in that case it throws an exception to avoid returning an invalid ID.

LobbygetLobby () const
PersongetPersonByUID (const std::string &uid)
void sight (const Atlas::Objects::Entity::RootEntity &room)
 Called by the lobby when sight of us arrives.


Public Attributes

SigC::Signal1< void, Room * > Entered
 Emitted when entry into the room (after a Join) is complete, i.e the user list has been transferred and resolved.

SigC::Signal3< void, Room *,
const std::string &, const
std::string & > 
Talk
 The primary talk callback.

SigC::Signal3< void, Room *,
const std::string &, const
std::string & > 
Emote
 Emote (/me) callback.

SigC::Signal2< void, Room *,
const std::string & > 
Appearance
 Emitted when a person enters the room; argument is the account ID.

SigC::Signal2< void, Room *,
const std::string & > 
Disappearance
 Similarly, emitted when the specifed person leaves the room.

SigC::Signal1< void, const
StringSet & > 
Changed
 Emitted when a room change occurs, such as name, topic, or the list of subrooms.


Protected Member Functions

 Room (Lobby *l, const std::string &id="")
 standard constructor.

void setup ()
 delayable initialization - allows the Lobby to defer signal binding and so on until the account INFO has been recieved.

void notifyPersonSight (Person *p)
 routed from the Lobby, which maintains the actual dispatcher

void recvSoundTalk (const Atlas::Objects::Operation::Talk &tk)
void recvAppear (const Atlas::Objects::Operation::Appearance &ap)
void recvDisappear (const Atlas::Objects::Operation::Disappearance &dis)
void recvSightImaginary (const Atlas::Objects::Operation::Imaginary &im)

Protected Attributes

std::string _id
 ID of the room entity.

Lobby_lobby
 the Lobby object

bool _parted
 Set if 'left'.

std::string _name
 displayed named of the room

std::string _creator
 ID of the account that created the room.

bool _initialGet
StringSet _subrooms
 the IDs of any sub-rooms

StringSet _people
 the account IDs of each person in the room

StringSet _pending
 persons for which appear/disappear has been received, but not (yet) SIGHT


Detailed Description

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.


Constructor & Destructor Documentation

Eris::Room::Room Lobby l,
const std::string &  id = ""
[explicit, protected]
 

standard constructor.

Issues a LOOK against the specified ID, and sets up the necessary signals to drive the Room if id arg is provided


Member Function Documentation

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.

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".


Member Data Documentation

SigC::Signal2<void, Room*, const std::string&> Eris::Room::Appearance
 

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.

SigC::Signal3<void, Room*, const std::string&, const std::string&> Eris::Room::Emote
 

Emote (/me) callback.

The arguments are identical to those for Talk above

SigC::Signal3<void, Room*, const std::string&, const std::string&> Eris::Room::Talk
 

The primary talk callback.

The arguments are the source room, the person talking, and the message itself


The documentation for this class was generated from the following files:
Generated on Tue Jul 27 21:00:43 2004 for Eris by doxygen 1.3.7