Samchon Framework for CPP  1.0.0
SystemRole.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <samchon/protocol/Entity.hpp>
5 #include <samchon/protocol/IProtocol.hpp>
6 
7 #include <set>
8 #include <string>
9 
10 namespace samchon
11 {
12 namespace protocol
13 {
23  class SAMCHON_FRAMEWORK_API SystemRole
24  : public virtual Entity,
25  public virtual IProtocol
26  {
27  protected:
28  typedef Entity super;
29 
33  std::string name;
34 
38  std::set<std::string> listeners;
39 
40  public:
41  /* ------------------------------------------------------------------
42  CONSTRUCTORS
43  ------------------------------------------------------------------ */
47  SystemRole();
48  virtual ~SystemRole() = default;
49 
50  virtual void construct(std::shared_ptr<library::XML>) override;
51 
52  /* ------------------------------------------------------------------
53  GETTERS
54  ------------------------------------------------------------------ */
55  virtual auto key() const->std::string override;
56 
60  auto hasListener(const std::string &) const -> bool;
61 
62  /* ------------------------------------------------------------------
63  EXPORTERS
64  ------------------------------------------------------------------ */
65  virtual auto TAG() const->std::string override;
66 
67  virtual auto toXML() const->std::shared_ptr<library::XML> override;
68  };
69 };
70 };
An entity, a standard data class.
Definition: Entity.hpp:48
std::set< std::string > listeners
Listeners belongs to the role.
Definition: SystemRole.hpp:38
std::string name
A name representing the role.
Definition: SystemRole.hpp:33
Definition: RWMutex.hpp:4
A role belongs to a system.
Definition: SystemRole.hpp:23
An interface of Invoke message chain.
Definition: IProtocol.hpp:31
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7