[cig-commits] r13877 - in short/3D/PyLith/trunk/playpen/swigtest: libsrc modulesrc python
brad at geodynamics.org
brad at geodynamics.org
Fri Jan 16 17:34:26 PST 2009
Author: brad
Date: 2009-01-16 17:34:26 -0800 (Fri, 16 Jan 2009)
New Revision: 13877
Modified:
short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.cc
short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.hh
short/3D/PyLith/trunk/playpen/swigtest/modulesrc/Scene.i
short/3D/PyLith/trunk/playpen/swigtest/modulesrc/geometry.i
short/3D/PyLith/trunk/playpen/swigtest/python/Bar.py
short/3D/PyLith/trunk/playpen/swigtest/python/Scene.py
short/3D/PyLith/trunk/playpen/swigtest/python/Shape.py
short/3D/PyLith/trunk/playpen/swigtest/python/Sphere.py
Log:
Removed use of directors (not needed). Cleaned up creation of module objects.
Modified: short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.cc
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.cc 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.cc 2009-01-17 01:34:26 UTC (rev 13877)
@@ -39,10 +39,5 @@
return _id;
}
-void
-geometry::Shape::view(void) const {
- throw std::runtime_error("Not implemented.");
-}
-
// End of file
Modified: short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.hh
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.hh 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/libsrc/Shape.hh 2009-01-17 01:34:26 UTC (rev 13877)
@@ -32,7 +32,7 @@
void id(const int value);
int id(void) const;
- virtual void view(void) const;
+ virtual void view(void) const = 0;
protected :
Modified: short/3D/PyLith/trunk/playpen/swigtest/modulesrc/Scene.i
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/modulesrc/Scene.i 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/modulesrc/Scene.i 2009-01-17 01:34:26 UTC (rev 13877)
@@ -34,6 +34,7 @@
void printData(const double* values,
const int size) const;
%clear (const double* values, const int size);
+
}; // Scene
} // namespace geometry
Modified: short/3D/PyLith/trunk/playpen/swigtest/modulesrc/geometry.i
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/modulesrc/geometry.i 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/modulesrc/geometry.i 2009-01-17 01:34:26 UTC (rev 13877)
@@ -1,7 +1,17 @@
-// SWIG interface
-%module(directors="1") geometry
-%feature("director");
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard
+// U.S. Geological Survey
+//
+// {LicenseText}
+//
+// ======================================================================
+//
+%module geometry
+
// Header files for module C++ code
%{
#include "Bar.hh"
Modified: short/3D/PyLith/trunk/playpen/swigtest/python/Bar.py
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/python/Bar.py 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/python/Bar.py 2009-01-17 01:34:26 UTC (rev 13877)
@@ -37,7 +37,6 @@
Constructor.
"""
Shape.__init__(self, name)
- ModuleBar.__init__(self)
return
@@ -54,6 +53,11 @@
return
+ def _createModuleObj(self):
+ ModuleBar.__init__(self)
+ return
+
+
# FACTORIES ////////////////////////////////////////////////////////////
def shape():
Modified: short/3D/PyLith/trunk/playpen/swigtest/python/Scene.py
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/python/Scene.py 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/python/Scene.py 2009-01-17 01:34:26 UTC (rev 13877)
@@ -39,7 +39,7 @@
Constructor.
"""
Component.__init__(self, name)
- ModuleScene.__init__(self)
+ self._createModuleObj()
return
@@ -56,6 +56,11 @@
return
+ def _createModuleObj(self):
+ ModuleScene.__init__(self)
+ return
+
+
# FACTORIES ////////////////////////////////////////////////////////////
def scene():
Modified: short/3D/PyLith/trunk/playpen/swigtest/python/Shape.py
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/python/Shape.py 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/python/Shape.py 2009-01-17 01:34:26 UTC (rev 13877)
@@ -36,6 +36,7 @@
Constructor.
"""
Component.__init__(self, name, facility="shape")
+ self._createModuleObj()
return
@@ -52,4 +53,9 @@
return
+ def _createModuleObj(self):
+ raise NotImplementedError("_createModuleObj() not implemented.")
+ return
+
+
# End of file
Modified: short/3D/PyLith/trunk/playpen/swigtest/python/Sphere.py
===================================================================
--- short/3D/PyLith/trunk/playpen/swigtest/python/Sphere.py 2009-01-16 01:22:47 UTC (rev 13876)
+++ short/3D/PyLith/trunk/playpen/swigtest/python/Sphere.py 2009-01-17 01:34:26 UTC (rev 13877)
@@ -34,7 +34,6 @@
Constructor.
"""
Shape.__init__(self, name)
- ModuleSphere.__init__(self)
return
@@ -50,6 +49,11 @@
return
+ def _createModuleObj(self):
+ ModuleSphere.__init__(self)
+ return
+
+
# FACTORIES ////////////////////////////////////////////////////////////
def shape():
More information about the CIG-COMMITS
mailing list