1 #include "ChatRoomArray.hpp" 2 #include "ChatRoom.hpp" 4 #include "ChatServer.hpp" 5 #include "ChatUser.hpp" 6 #include "ChatClient.hpp" 7 #include "ListService.hpp" 10 #include <samchon/library/XML.hpp> 11 #include <samchon/protocol/Invoke.hpp> 27 shared_ptr<Invoke> &invoke = this->
toInvoke();
32 auto user = it->second;
34 for (
auto u_it = user->begin(); u_it != user->end(); u_it++)
36 auto client = u_it->second;
37 auto service = client->getService();
39 if (dynamic_cast<ListService>(service) !=
nullptr)
40 thread(&IProtocol::sendData, service, invoke).detach();
47 shared_ptr<XML> xml(
new XML());
51 for(
auto it = begin(); it != end(); it++)
52 xml->push_back(it->second->toXML());
58 Invoke *invoke =
new Invoke(
"handleRoomArray",
toXML());
59 return shared_ptr<Invoke>(invoke);
ChatServer * server
A chat server that rooms are belonged to.
A chat service inherited from cloud service.
auto begin() const -> const_iterator
A const iterator of begin.
An iternface for entity group.
auto end() const -> const_iterator
A const iterator of end.
auto toInvoke() const -> std::shared_ptr< protocol::Invoke >
Get an Invoke message used to notifying change.
Package of network protocol and libraries.
Standard message of network I/O.
auto toXML() const -> std::shared_ptr< library::XML >
Get an XML object representing the ChatRoomArray.
void notify()
Notify changes of chat rooms.
XML is a class representing xml object.