2 #include <samchon/protocol/Entity.hpp> 3 #include <samchon/protocol/IProtocol.hpp> 6 #include <samchon/library/CriticalSet.hpp> 13 namespace chat_service
40 virtual auto TAG() const ->
std::
string {
return "room"; };
93 virtual void replyData(std::shared_ptr<protocol::Invoke>)
override;
94 virtual void sendData(std::shared_ptr<protocol::Invoke>)
override;
100 virtual auto toXML() const ->
std::shared_ptr<library::XML> override;
An entity, a standard data class.
ChatUser * host
A host, who established the room.
void registerClient(ChatService *)
Register a participant client.
library::CriticalSet< ChatService * > participants
Participants, ChatUser(s) in the room.
ChatRoom(ChatRoomArray *, const std::string &, ChatUser *)
Construct from rooms, name and host.
ChatRoomArray * roomArray
All rooms that the room is belonged to.
An interface of Invoke message chain.
virtual auto toXML() const -> std::shared_ptr< library::XML > override
Get an XML object represents the Entity.
virtual auto TAG() const -> std::string
A tag name when represented by XML.
std::string name
Name of the room.
std::set< T, _Pr, CriticalAllocator< T >> CriticalSet
A Set ensures concurrency.
Top level namespace of products built from samchon.
void eraseClient(ChatService *)
Erase a participant client.