Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1034 - in trunk: Engine Engine/Control Engine/Factory StandAlone


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1034 - in trunk: Engine Engine/Control Engine/Factory StandAlone
  • Date: Tue, 2 May 2006 14:22:04 -0600 (MDT)

Author: sparker
Date: Tue May  2 14:21:50 2006
New Revision: 1034

Added:
   trunk/Engine/Factory/Create.cc
   trunk/Engine/Factory/Create.h
Modified:
   trunk/Engine/CMakeLists.txt
   trunk/Engine/Control/RTRT.cc
   trunk/Engine/Factory/CMakeLists.txt
   trunk/Engine/Factory/RegisterKnownComponents.h
   trunk/StandAlone/CMakeLists.txt
Log:
Move create and register to completely avoid circular dependencies with the 
factory


Modified: trunk/Engine/CMakeLists.txt
==============================================================================
--- trunk/Engine/CMakeLists.txt (original)
+++ trunk/Engine/CMakeLists.txt Tue May  2 14:21:50 2006
@@ -26,6 +26,7 @@
                                    Manta_Image
                                    Manta_Interface
                                    Manta_Core
+                                   Manta_Core_XUtils
                                    SCIRun_Core
                                    )
 
@@ -34,4 +35,4 @@
                                    )
 
 # Build the factory library
-SUBDIRS(Factory)
\ No newline at end of file
+SUBDIRS(Factory)

Modified: trunk/Engine/Control/RTRT.cc
==============================================================================
--- trunk/Engine/Control/RTRT.cc        (original)
+++ trunk/Engine/Control/RTRT.cc        Tue May  2 14:21:50 2006
@@ -1,6 +1,5 @@
 
 #include <Engine/Control/RTRT.h>
-#include <Engine/Factory/RegisterKnownComponents.h>
 #include <Core/Util/Args.h>
 #include <Interface/AmbientLight.h>
 #include <Interface/Background.h>
@@ -54,14 +53,6 @@
 
 #define RENDER_THREAD_STACKSIZE 8*1024*1024
 
-namespace Manta {
-  MantaInterface* createManta()
-  {
-    return new RTRT();
-  }
-
-}
-
 
///////////////////////////////////////////////////////////////////////////////
 
////////////////////////////////////////////////////////////////////////////////
 // RTRT Worker class.
@@ -104,7 +95,6 @@
   frameRate = 15;
   pipelineNeedsSetup = true;
   currentImageCreator = 0;
-  registerKnownComponents(this);
   scene = 0;
   verbose_transactions = false;
   currentPixelSampler = 0;

Modified: trunk/Engine/Factory/CMakeLists.txt
==============================================================================
--- trunk/Engine/Factory/CMakeLists.txt (original)
+++ trunk/Engine/Factory/CMakeLists.txt Tue May  2 14:21:50 2006
@@ -1,4 +1,6 @@
 SET (Manta_Factory_SRCS
+  Create.cc
+  Create.h
   RegisterKnownComponents.cc
   RegisterKnownComponents.h
   )

Added: trunk/Engine/Factory/Create.cc
==============================================================================
--- (empty file)
+++ trunk/Engine/Factory/Create.cc      Tue May  2 14:21:50 2006
@@ -0,0 +1,16 @@
+
+#include <Engine/Factory/Create.h>
+#include <Engine/Factory/RegisterKnownComponents.h>
+#include <Engine/Control/RTRT.h>
+
+using namespace Manta;
+
+namespace Manta {
+  MantaInterface* createManta()
+  {
+    MantaInterface* manta = new RTRT();
+    registerKnownComponents(manta);
+    return manta;
+  }
+}
+

Added: trunk/Engine/Factory/Create.h
==============================================================================
--- (empty file)
+++ trunk/Engine/Factory/Create.h       Tue May  2 14:21:50 2006
@@ -0,0 +1,44 @@
+
+/*
+ For more information, please see: http://software.sci.utah.edu

+ The MIT License

+ Copyright (c) 2005 Scientific Computing and Imaging Institute,
+ University of Utah.

+ License for the specific language governing rights and limitations under
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:

+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.

+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef Manta_Engine_Factory_Create_h
+#define Manta_Engine_Factory_Create_h
+
+namespace Manta {
+
+  class MantaInterface;
+       
+  
/////////////////////////////////////////////////////////////////////////////
+  // Register all "known" components with the RTRTInterface.
+  // ImageTraversers, PixelSamplers, other command line args should be added 
to
+  // the RTRT_register.cc file.
+  MantaInterface* createManta();
+};
+
+#endif

Modified: trunk/Engine/Factory/RegisterKnownComponents.h
==============================================================================
--- trunk/Engine/Factory/RegisterKnownComponents.h      (original)
+++ trunk/Engine/Factory/RegisterKnownComponents.h      Tue May  2 14:21:50 
2006
@@ -27,18 +27,18 @@
  DEALINGS IN THE SOFTWARE.
  */
 
-#ifndef Manta_Engine_Factory_RegisteryKnownComponents_h
-#define Manta_Engine_Factory_RegisteryKnownComponents_h
+#ifndef Manta_Engine_Factory_RegisterKnownComponents_h
+#define Manta_Engine_Factory_RegisterKnownComponents_h
 
 namespace Manta {
 
   class MantaInterface;
        
-       
/////////////////////////////////////////////////////////////////////////////
-       // Register all "known" components with the RTRTInterface.
-       // ImageTraversers, PixelSamplers, other command line args should be 
added to
-       // the RTRT_register.cc file.
-       extern void registerKnownComponents(MantaInterface* rtrt);
+  
/////////////////////////////////////////////////////////////////////////////
+  // Register all "known" components with the RTRTInterface.
+  // ImageTraversers, PixelSamplers, other command line args should be added 
to
+  // the RTRT_register.cc file.
+  void registerKnownComponents(MantaInterface* rtrt);
 };
 
 #endif

Modified: trunk/StandAlone/CMakeLists.txt
==============================================================================
--- trunk/StandAlone/CMakeLists.txt     (original)
+++ trunk/StandAlone/CMakeLists.txt     Tue May  2 14:21:50 2006
@@ -4,7 +4,7 @@
 
  TARGET_LINK_LIBRARIES(manta ${CMAKE_THREAD_LIBS_INIT}
                              ${OPENGL_LIBRARIES}
-                                              ${X11_LIBRARIES}
+                             ${X11_LIBRARIES}
                              -lm)
 
 




  • [MANTA] r1034 - in trunk: Engine Engine/Control Engine/Factory StandAlone, sparker, 05/02/2006

Archive powered by MHonArc 2.6.16.

Top of page