summaryrefslogtreecommitdiffstats
path: root/lib/CommLayer/CommLayerServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CommLayer/CommLayerServer.cpp')
-rw-r--r--lib/CommLayer/CommLayerServer.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/CommLayer/CommLayerServer.cpp b/lib/CommLayer/CommLayerServer.cpp
new file mode 100644
index 0000000..1ebae6d
--- /dev/null
+++ b/lib/CommLayer/CommLayerServer.cpp
@@ -0,0 +1,30 @@
+#include "CommLayerServer.h"
+#include <iostream>
+
+CCommLayerServer::CCommLayerServer(CMiddleWare *pMW)
+{
+ m_pMW = pMW;
+ std::cerr << "CCommLayerServer init.." << std::endl;
+}
+
+CCommLayerServer::~CCommLayerServer()
+{
+ std::cout << "CCommLayerServer::Cleaning up.." << std::endl;
+}
+
+void CCommLayerServer::Attach(CObserver *pObs)
+{
+ std::cerr << "CCommLayerServer::Attach" << std::endl;
+ m_pObserver = pObs;
+}
+void CCommLayerServer::Detach(CObserver *pObs)
+{
+ std::cerr << "CCommLayerServer::Detach" << std::endl;
+ m_pObserver = NULL;
+}
+void CCommLayerServer::Notify(const std::string& pMessage)
+{
+ std::cerr << "CCommLayerServer::Notify" << std::endl;
+ if(m_pObserver)
+ m_pObserver->Update(pMessage);
+}