3 #include <NodeInfo.pb.h>
23 std::string
uuid()
const;
26 std::shared_ptr<Socket>
pipe()
const;
32 void addClient(std::string uuid, std::string type);
36 void addOther(std::string uuid, std::string type);
43 virtual void onEnter(
Message * pInMsg, std::vector<std::string> & out, std::string type);
44 virtual void onExit(
Message * pInMsg, std::vector<std::string> & out);
49 std::shared_ptr<Socket>
mpPipe =
nullptr;
51 std::map<std::string, std::string>
mOthers{};
std::string mUUID
Self UUID.
virtual void onEnter(Message *pInMsg, std::vector< std::string > &out, std::string type)
TODO Three horsemen of apocalypse.
void addOther(std::string uuid, std::string type)
std::shared_ptr< Socket > mpPipe
Pipe for messages (net connector)
NodeManager * mpNodeManager
Node Manager.
std::shared_ptr< Socket > pipe() const
TODO Returns distributor's pipe?
NodeInfo * nodeInfo() const
std::map< std::string, std::string > mOthers
List of others.
std::string uuid() const
Returns distributor's UUID.
std::map< std::string, std::string > mClients
List of clients.
virtual void onWhisper(Message *pInMsg, std::vector< std::string > &out)
virtual void onExit(Message *pInMsg, std::vector< std::string > &out)
NodeInfo * mpNodeInfo
Node Info.
Distributor(std::string uuid, std::shared_ptr< Socket > pPipe, NodeManager *pNM)
void print() const
TODO Prints distributor's state.
void addClient(std::string uuid, std::string type)
void removeClient(std::string uuid)
void removeOther(std::string uuid)