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;
17 using namespace Atlas::Objects::Operation;
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);
const std::string & getId() const
returns the account ID if logged in
bool isConnected() const
Ascertain whether or not the connection is usable for transport.
virtual void send(const Atlas::Objects::Root &obj)
Transmit an Atlas::Objects instance to the server.
Account & getAccount() const
Retrive the Account which this lobbby is bound to.
Connection & getConnection() const
Helper method to access the underlying Connection from the Account.
std::string m_fullName
the name, i.e account.GetName()
void msg(const std::string &msg)
const std::string m_id
the account ID
void sight(const Atlas::Objects::Entity::Account &acc)
update a person based on sight
Lobby & m_lobby
the lobby owning this Person
std::int64_t getNewSerialno()
operation serial number sequencing