FREEDM DGI
IDGIModule.hpp
Go to the documentation of this file.
1 
21 #ifndef IDGIMODULE_HPP
22 #define IDGIMODULE_HPP
23 
24 #include "CPeerNode.hpp"
25 
26 #include "messages/ModuleMessage.pb.h"
27 
28 #include <boost/noncopyable.hpp>
29 #include <boost/shared_ptr.hpp>
30 
31 namespace freedm {
32 
33 namespace broker {
34 
37  : private boost::noncopyable
38 {
44 public:
46  IDGIModule();
47 
49  virtual ~IDGIModule() {};
50 
52  virtual void HandleIncomingMessage(
53  boost::shared_ptr<const ModuleMessage> msg, CPeerNode peer) = 0;
54 
55 protected:
57  std::string GetUUID() const;
58 
60  CPeerNode GetMe();
61 
62 private:
65 };
66 
67 } // namespace freedm
68 
69 } // namespace broker
70 
71 #endif // IHANDLER_HPP
CPeerNode GetMe()
Gets a CPeerNode representing this process.
Definition: IDGIModule.cpp:54
virtual ~IDGIModule()
Virtual destructor for inhertiance.
Definition: IDGIModule.hpp:49
Base interface for agents/broker modules.
Definition: CPeerNode.hpp:37
IDGIModule()
Constructor, initializes the reference to self.
Definition: IDGIModule.cpp:35
An interface for an object which can handle recieving incoming messages.
Definition: IDGIModule.hpp:36
std::string GetUUID() const
Gets the UUID of this process.
Definition: IDGIModule.cpp:45
General FREEDM Namespace.
Definition: CBroker.cpp:53
virtual void HandleIncomingMessage(boost::shared_ptr< const ModuleMessage > msg, CPeerNode peer)=0
Handles received messages.
CPeerNode m_me
The CPeerNode this represents.
Definition: IDGIModule.hpp:64