Revision: 40865
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40865&view=rev
Author:   davidloman
Date:     2010-09-29 19:18:58 +0000 (Wed, 29 Sep 2010)

Log Message:
-----------
Flesh out DataManager::handleGeometryReqMsg() a bit more.  Add in local Logger 
reference.

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

Modified: rt^3/trunk/include/DataManager.h
===================================================================
--- rt^3/trunk/include/DataManager.h    2010-09-29 19:18:17 UTC (rev 40864)
+++ rt^3/trunk/include/DataManager.h    2010-09-29 19:18:58 UTC (rev 40865)
@@ -29,6 +29,8 @@
 
 #include "INetMsgHandler.h"
 #include "IDataSource.h"
+#include "GeometryReqMsg.h"
+#include "Logger.h"
 
 #include <QtCore/QString>
 #include <QtCore/QUuid>
@@ -51,9 +53,12 @@
        static DataManager* pInstance;
        DataManager();
 
+       Logger* log;
        QMutex sourceLock;
        QList<IDataSource*> datasources;
 
+       void handleGeometryReqMsg(GeometryReqMsg* msg);
+
 };
 
 #endif /* __DATAMANAGER_H__ */

Modified: rt^3/trunk/src/GS/DataManager.cxx
===================================================================
--- rt^3/trunk/src/GS/DataManager.cxx   2010-09-29 19:18:17 UTC (rev 40864)
+++ rt^3/trunk/src/GS/DataManager.cxx   2010-09-29 19:18:58 UTC (rev 40865)
@@ -25,7 +25,7 @@
  */
 
 #include "DataManager.h"
-#include "NetMsgTypes.h"
+#include "libnet.h"
 
 #include <QtCore/QMutexLocker>
 
@@ -33,6 +33,7 @@
 
 DataManager::DataManager()
 {
+       this->log = Logger::getInstance();
 }
 
 DataManager::~DataManager()
@@ -60,6 +61,7 @@
        quint16 type = msg->getMsgType();
        switch(type) {
        case GEOMETRYREQ:
+               this->handleGeometryReqMsg((GeometryReqMsg*)msg);
                return true;
        case GEOMETRYMANIFEST:
                return true;
@@ -69,6 +71,33 @@
        return false;
 }
 
+void
+DataManager::handleGeometryReqMsg(GeometryReqMsg* msg)
+{
+       quint8 reqType = msg->getRequestType();
+       QString data = msg->getData();
+       Portal* origin = msg->getOrigin();
+
+       //validate incoming data
+       if (origin == 0) {
+               //TODO Figure out how to how to handle NULL Portal
+               log->logERROR("DataManager", "handleGeometryReqMsg(): NULL 
Portal!");
+               return;
+       }
+
+       if (reqType == REQ_BY_PATH){
+
+       } else if (reqType == REQ_BY_UUID) {
+               //Not implemented!!!
+
+       } else {
+               //Not implemented!!!
+
+       }
+
+}
+
+
 DataManager* DataManager::getInstance()
 {
        if (!DataManager::pInstance)


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