[cig-commits] r12373 - cs/spatialdata-0.1/trunk/templates/spatialdb

brad at geodynamics.org brad at geodynamics.org
Thu Jul 3 15:11:55 PDT 2008


Author: brad
Date: 2008-07-03 15:11:55 -0700 (Thu, 03 Jul 2008)
New Revision: 12373

Modified:
   cs/spatialdata-0.1/trunk/templates/spatialdb/GeoGridVelModel.py
   cs/spatialdata-0.1/trunk/templates/spatialdb/Makefile.am
   cs/spatialdata-0.1/trunk/templates/spatialdb/configure.ac
   cs/spatialdata-0.1/trunk/templates/spatialdb/spatialdb.pyxe.src
Log:
Fixed configure/Makefile for template.

Modified: cs/spatialdata-0.1/trunk/templates/spatialdb/GeoGridVelModel.py
===================================================================
--- cs/spatialdata-0.1/trunk/templates/spatialdb/GeoGridVelModel.py	2008-07-03 22:11:08 UTC (rev 12372)
+++ cs/spatialdata-0.1/trunk/templates/spatialdb/GeoGridVelModel.py	2008-07-03 22:11:55 UTC (rev 12373)
@@ -10,9 +10,8 @@
 # ----------------------------------------------------------------------
 #
 
-# 1. Rename the MyVelModel class to something appropriate (do a
-#    search/replace on MyVelModel).
-# 2. Add the necessary Pyre properties and facilities for user parameters.
+# 1. Rename the GeoGridVelModel class to something appropriate.
+# 2. Adjust the Pyre properties and facilities for user parameters.
 # 3. Update the constructor, __init__().
 # 4. Update initialize().
 # 5. Update _configure().
@@ -24,8 +23,8 @@
 
 from spatialdata.spatialdb.SpatialDB import SpatialDB
 
-# MyVelModel class
-class MyVelModel(SpatialDB):
+# GeoGridVelModel class
+class GeoGridVelModel(SpatialDB):
   """
   Python manager for spatial database to a new velocity model.
 
@@ -36,11 +35,11 @@
 
   class Inventory(SpatialDB.Inventory):
     """
-    Python object for managing MyVelModel facilities and properties.
+    Python object for managing GeoGridVelModel facilities and properties.
     """
 
     ## @class Inventory
-    ## Python object for managing MyVelModel facilities and properties.
+    ## Python object for managing GeoGridVelModel facilities and properties.
     ##
     ## \b Properties
     ## @li \b filename Filename for seismic velocity model.
@@ -57,14 +56,16 @@
   # PUBLIC METHODS /////////////////////////////////////////////////////
 
   # Change this name.
-  def __init__(self, name="myvelmodel"):
+  def __init__(self, name="geogridvelmodel"):
     """
     Constructor.
     """
-    SpatialDB.__init__(self, name)
+    SpatialDB.__init__(self, name) # Call parent function
+
+    # Create handle to corresponding C++ object
     import spatialdb as bindings
-    self.cppHandle = bindings.MyVelModel() # Change this
-    self.cppHandle.label = "My velocity model" # Change this
+    self.cppHandle = bindings.GeoGridVelModel()
+    self.cppHandle.label = "Geographic gridded velocity model"
     return
 
 
@@ -72,7 +73,7 @@
     """
     Initialize database.
     """
-    SpatialDB.initialize(self)
+    SpatialDB.initialize(self) # Call parent function
 
     # Transfer Pyre properties/facilities to C++
     self.cppHandle.filename(self.filename)
@@ -85,7 +86,8 @@
     """
     Set members based on inventory.
     """
-    SpatialDB._configure(self)
+    SpatialDB._configure(self) # Call parent function.
+    
     # Transfer inventory to object
     self.filename = self.inventory.filename
     return
@@ -93,11 +95,13 @@
 
 # FACTORIES ////////////////////////////////////////////////////////////
 
+# Factory used when setting GeoGridVelModel to a Pyre
+# 'spatial_database' facility.
 def spatial_database():
   """
-  Factory associated with MyVelModel.
+  Factory associated with GeoGridVelModel.
   """
-  return MyVelModel()
+  return GeoGridVelModel()
 
 
 # End of file 

Modified: cs/spatialdata-0.1/trunk/templates/spatialdb/Makefile.am
===================================================================
--- cs/spatialdata-0.1/trunk/templates/spatialdb/Makefile.am	2008-07-03 22:11:08 UTC (rev 12372)
+++ cs/spatialdata-0.1/trunk/templates/spatialdb/Makefile.am	2008-07-03 22:11:55 UTC (rev 12373)
@@ -10,6 +10,9 @@
 # ----------------------------------------------------------------------
 #
 
+ACLOCAL_AMFLAGS = -I ./m4
+
+
 # LIBRARY --------------------------------------------------------------
 lib_LTLIBRARIES = libyournamespatialdb.la
 
@@ -26,19 +29,19 @@
 
 # MODULE ---------------------------------------------------------------
 
-pkgpyexec_LTLIBRARIES = yournamespatialdbmodule.la
+pkgpyexec_LTLIBRARIES = spatialdbmodule.la
 
-yournamespatialdbmodule_la_LDFLAGS = -module -avoid-version \
+spatialdbmodule_la_LDFLAGS = -module -avoid-version \
 	$(AM_LDFLAGS) $(PYTHON_LA_LDFLAGS)
 
-dist_yournamespatialdbmodule_la_SOURCES = spatialdb.pyxe.src
-nodist_yournamespatialdbmodule_la_SOURCES = \
+dist_spatialdbmodule_la_SOURCES = spatialdb.pyxe.src
+nodist_spatialdbmodule_la_SOURCES = \
 	spatialdb.pyxe \
 	spatialdb.c spatialdb_embed.cpp spatialdb_embed.h
 
-yournamespatialdbmodule_la_LIBADD = libyournamespatialdb.la
+spatialdbmodule_la_LIBADD = libyournamespatialdb.la
 if NO_UNDEFINED
-yournamespatialdbmodule_la_LIBADD += \
+spatialdbmodule_la_LIBADD += \
 	$(PYTHON_BLDLIBRARY) $(PYTHON_LIBS) $(PYTHON_SYSLIBS)
 endif
 

Modified: cs/spatialdata-0.1/trunk/templates/spatialdb/configure.ac
===================================================================
--- cs/spatialdata-0.1/trunk/templates/spatialdb/configure.ac	2008-07-03 22:11:08 UTC (rev 12372)
+++ cs/spatialdata-0.1/trunk/templates/spatialdb/configure.ac	2008-07-03 22:11:55 UTC (rev 12373)
@@ -103,4 +103,5 @@
 
 AC_OUTPUT
 
-dnl end of configure.ac
+
+# End of file

Modified: cs/spatialdata-0.1/trunk/templates/spatialdb/spatialdb.pyxe.src
===================================================================
--- cs/spatialdata-0.1/trunk/templates/spatialdb/spatialdb.pyxe.src	2008-07-03 22:11:08 UTC (rev 12372)
+++ cs/spatialdata-0.1/trunk/templates/spatialdb/spatialdb.pyxe.src	2008-07-03 22:11:55 UTC (rev 12373)
@@ -12,7 +12,7 @@
 
 #header{
 #include "spatialdata/spatialdb/SpatialDB.hh"
-#include "spatialdata/spatialdb/GeoVelModel.hh"
+#include "GeoGridVelModel.hh"
 
 #include "spatialdata/geocoords/CoordSys.hh"
 
@@ -312,7 +312,7 @@
     """
     # create shim for constructor
     #embed{ void* GeoGridVelModel_constructor()
-      return (void*)(new spatialdata::spatialdb::GeoGridVelModel);
+      return (void*)(new yourname::spatialdb::GeoGridVelModel);
     #}embed
 
     SpatialDB.__init__(self)
@@ -328,7 +328,7 @@
     # create shim for method 'filename'
     #embed{ void GeoGridVelModel_filename(void* pObj, char* name)
     assert(0 != pObj);
-    ((spatialdata::spatialdb::GeoGridVelModel*) pObj)->filename(name);
+    ((yourname::spatialdb::GeoGridVelModel*) pObj)->filename(name);
     #}embed
 
     GeoGridVelModel_filename(self.thisptr, name)



More information about the cig-commits mailing list