Samchon Framework for CPP  1.0.0
ChatMessage.hpp
1 #pragma once
2 #include <set>
3 #include <string>
4 
5 #include <samchon/protocol/Entity.hpp>
6 
7 namespace samchon
8 {
9  namespace example
10  {
11  namespace chat_service
12  {
25  : public protocol::Entity
26  {
27  protected:
28  typedef protocol::Entity super;
29 
30  virtual auto TAG() const -> std::string
31  {
32  return "message";
33  };
34 
35  private:
39  std::string orator;
40 
45  std::string listener;
46 
50  std::string message;
51 
52  public:
53  /* -----------------------------------------------------------
54  CONSTRUCTORS
55  ----------------------------------------------------------- */
59  ChatMessage();
60  virtual ~ChatMessage() = default;
61 
62  virtual void construct(std::shared_ptr<library::XML>);
63 
64  /* -----------------------------------------------------------
65  GETTERS
66  ----------------------------------------------------------- */
71  auto getListener() const -> std::string;
72 
73  virtual auto toXML() const -> std::shared_ptr<library::XML>;
74  };
75  };
76  };
77 };
std::string listener
A listener, target of whispering.
Definition: ChatMessage.hpp:45
An entity, a standard data class.
Definition: Entity.hpp:115
std::string message
A message, what to say.
Definition: ChatMessage.hpp:50
auto getListener() const -> std::string
Get listener.
std::string orator
An orator, who told.
Definition: ChatMessage.hpp:33