Revision: 40791
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40791&view=rev
Author:   davidloman
Date:     2010-09-29 12:10:28 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
Add method for registering NetMsg routing data upon cstr call.

Modified Paths:
--------------
    rt^3/trunk/include/GeometryService.h
    rt^3/trunk/src/GS/GeometryService.cxx

Modified: rt^3/trunk/include/GeometryService.h
===================================================================
--- rt^3/trunk/include/GeometryService.h        2010-09-29 12:09:05 UTC (rev 
40790)
+++ rt^3/trunk/include/GeometryService.h        2010-09-29 12:10:28 UTC (rev 
40791)
@@ -41,10 +41,14 @@
        bool preRunHook();
        void _run();
        bool postRunHook();
+
 private:
        Logger* log;
        QString localNodeName;
        quint16 listenPort;
+
+       void registerMsgRoutes();
+
 };
 
 #endif

Modified: rt^3/trunk/src/GS/GeometryService.cxx
===================================================================
--- rt^3/trunk/src/GS/GeometryService.cxx       2010-09-29 12:09:05 UTC (rev 
40790)
+++ rt^3/trunk/src/GS/GeometryService.cxx       2010-09-29 12:10:28 UTC (rev 
40791)
@@ -25,12 +25,16 @@
 
 #include "GeometryService.h"
 #include "SessionManager.h"
+#include "libnet.h"
 
 GeometryService::GeometryService(const QString localNodeName, quint16 
listenPort) :
 localNodeName(localNodeName), listenPort(listenPort)
 {
     this->log = Logger::getInstance();
     this->log->logINFO("GeometryService", localNodeName + " is starting 
up...");
+
+    this->registerMsgRoutes();
+
 }
 
 GeometryService::~GeometryService()
@@ -38,6 +42,17 @@
 
 }
 
+void
+GeometryService::registerMsgRoutes()
+{
+       NetMsgRouter* router = NetMsgRouter::getInstance();
+
+       router->registerType(NEWSESSIONREQ, SessionManager::getInstance());
+       router->registerType(SESSIONINFO, SessionManager::getInstance());
+       router->registerType(LOGOUTSESSION, SessionManager::getInstance());
+
+}
+
 bool
 GeometryService::preRunHook() {
        //Do initi stuff here


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to