Samchon Framework for CPP  1.0.0
ChatRoomArray.hpp
1 #pragma once
2 #include <samchon/library/CriticalDictionary.hpp>
3 #include <samchon/protocol/IEntityGroup.hpp>
4 
5 namespace samchon
6 {
7  namespace library { class XML; };
8  namespace protocol { class Invoke; };
9 
10  namespace example
11  {
12  namespace chat_service
13  {
14  class ChatRoom;
15 
16  class ChatServer;
17  class ChatUser;
18 
32  : public CriticalDictionary<std::shared_ptr<ChatRoom>>,
33  public protocol::IEntityGroup
34  {
35  protected:
36  typedef CriticalDictionary<std::shared_ptr<ChatRoom>> super;
37 
38  virtual auto TAG() const -> std::string { return "roomArray"; };
39  virtual auto CHILD_TAG() const -> std::string { return "room"; };
40 
41  private:
46 
47  public:
48  /* -----------------------------------------------------------------
49  CONSTRUCTORS
50  ----------------------------------------------------------------- */
55  virtual ~ChatRoomArray() = default;
56 
57  /* -----------------------------------------------------------------
58  NOTIFIER
59  ----------------------------------------------------------------- */
64  void notify();
65 
66  private:
67  /* -----------------------------------------------------------------
68  EXPORTERS
69  ----------------------------------------------------------------- */
73  auto toXML() const -> std::shared_ptr<library::XML>;
74 
78  auto toInvoke() const -> std::shared_ptr<protocol::Invoke>;
79  };
80  };
81  };
82 };
ChatServer * server
A chat server that rooms are belonged to.