#pragma once #include #include #include namespace samchon { namespace examples { namespace interaction { class Chief; class MasterSystem : public templates::distributed::DistributedSystem, public base::SystemBase { private: typedef templates::distributed::DistributedSystem super; public: /* --------------------------------------------------------- CONSTRUCTORS --------------------------------------------------------- */ MasterSystem(Chief *chief, std::shared_ptr driver) : super((templates::external::base::ExternalSystemArrayBase*)chief, driver) { }; virtual ~MasterSystem() { if (getUID() != -1) getSystemArray()->getMonitor()->sendSystemStructure(); }; virtual void construct(std::shared_ptr xml) override { setUID(xml->getProperty("uid")); super::construct(xml); }; /* --------------------------------------------------------- INVOKE MESSAGE CHAIN --------------------------------------------------------- */ virtual void sendData(std::shared_ptr invoke) override { super::sendData(invoke); // NOTIFY SEND_DATA getSystemArray()->getMonitor()->reportSendData(getUID(), invoke); }; }; }; }; };