2 #include <samchon/templates/external/ExternalSystem.hpp>     4 #include <samchon/examples/interaction/base/MonitorBase.hpp>     5 #include <samchon/examples/interaction/base/ReporterBase.hpp>     6 #include <samchon/examples/interaction/base/SystemBase.hpp>    18     class Viewer : 
public templates::external::ExternalSystem
    21         typedef templates::external::ExternalSystem super;
    27         Viewer(Reporter *reporter, std::shared_ptr<protocol::ClientDriver> driver)
    28             : super((templates::external::base::ExternalSystemArrayBase*)reporter, driver)
    30             std::cout << 
"A viewer has connected" << std::endl;
    35             System *system = ((base::MonitorBase*)(((base::ReporterBase*)reporter)->getMonitor()))->getRootSystem();
    36             if (system == 
nullptr)
    40             sendData(std::make_shared<protocol::Invoke>(
"setSystems", ((base::SystemBase*)system)->
toXML()));
    44             std::cout << 
"A veiwer has disconnected" << std::endl;
    48         virtual auto createChild(std::shared_ptr<library::XML>) -> templates::external::ExternalSystemRole* 
override virtual auto toXML() const  -> std::shared_ptr< library::XML > override
Get an XML object represents the EntityGroup. 
virtual void sendData(std::shared_ptr< protocol::Invoke > invoke) override