7 #include "Exceptions.h" 9 #include "Connection.h" 12 #include <Atlas/Objects/Entity.h> 13 #include <Atlas/Objects/Anonymous.h> 14 #include <Atlas/Objects/Operation.h> 16 typedef Atlas::Objects::Entity::Account AtlasAccount;
18 using Atlas::Objects::Entity::Anonymous;
19 using Atlas::Objects::Root;
24 Person::Person(
Lobby &l,
const AtlasAccount &acc) :
26 m_fullName(acc->getName()),
34 if (acc->getId() !=
m_id)
36 error() <<
"person got sight(account) with mismatching Ids";
40 if (acc->isDefaultName()) {
51 error() <<
"sending private chat, but connection is down";
56 speech->setAttr(
"say",msg);
void sight(const Atlas::Objects::Entity::Account &acc)
update a person based on sight
std::string m_fullName
the name, i.e account.GetName()
Lobby & m_lobby
the lobby owning this Person
const std::string m_id
the account ID
virtual void send(const Atlas::Objects::Root &obj)
Transmit an Atlas::Objects instance to the server.
std::int64_t getNewSerialno()
operation serial number sequencing
bool isConnected() const
Ascertain whether or not the connection is usable for transport.
const std::string & getId() const
returns the account ID if logged in
void msg(const std::string &msg)
Connection & getConnection() const
Helper method to access the underlying Connection from the Account.
Account & getAccount() const
Retrive the Account which this lobbby is bound to.