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

Log Message:
-----------
Add the ability for geoserv to detect if UseFileRepo is set to 'yes' and then 
look for 'FileRepoPath' to make a FileDataSource.  Once made, add the FDS to 
the GeometryService's internal DataManager.

Modified Paths:
--------------
    rt^3/trunk/src/GS/geoserv.cxx

Modified: rt^3/trunk/src/GS/geoserv.cxx
===================================================================
--- rt^3/trunk/src/GS/geoserv.cxx       2010-09-29 18:55:59 UTC (rev 40859)
+++ rt^3/trunk/src/GS/geoserv.cxx       2010-09-29 18:59:37 UTC (rev 40860)
@@ -24,6 +24,7 @@
  */
 
 #include "GeometryService.h"
+#include "FileDataSource.h"
 
 #include "libutility.h"
 #include "libevent.h"
@@ -75,10 +76,29 @@
        return 1;
     }
 
+
     bool daemon = false;
 
     GeometryService* gs = new GeometryService(localNodename, port);
 
+
+    //DataManager elements.
+    QString useFileRepo = c->getConfigValue("UseFileRepo").toLower();
+     if (useFileRepo == "yes" || useFileRepo == "true"){
+       QString fileRepoPath = c->getConfigValue("FileRepoPath").toLower();
+
+       if (fileRepoPath.length() == 0) {
+               log->logERROR("geoserv", "FileRepo was flagged for use, but no 
'FilePathRepo' var was configured.");
+               return 1;
+       }
+
+       log->logINFO("geoserv", "FileDataSouce being used.");
+        FileDataSource* fds = new FileDataSource(fileRepoPath);
+        gs->getDataManager()->addDataSource(fds);
+     }
+
+
+
     if (daemon){
        gs->start(); //will exit
     } else {


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