Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58448 - sandbox/numeric_bindings/libs/numeric/bindings/tools
From: rutger_at_[hidden]
Date: 2009-12-18 03:20:10


Author: rutger
Date: 2009-12-18 03:20:09 EST (Fri, 18 Dec 2009)
New Revision: 58448
URL: http://svn.boost.org/trac/boost/changeset/58448

Log:
sync of numeric_bindings source code, docs, etc. generators

Text files modified:
   sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py | 18 ++++++++++++++++++
   sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py | 8 +++-----
   2 files changed, 21 insertions(+), 5 deletions(-)

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/bindings.py 2009-12-18 03:20:09 EST (Fri, 18 Dec 2009)
@@ -279,3 +279,21 @@
     #print "result: ", result
     return result, static_asserts
 
+#
+# Generate the call to the value_tye meta-func
+#
+def value_type( arg ):
+ return 'typename value< ' + arg + ' >::type'
+
+
+
+
+
+
+
+
+
+
+
+
+

Modified: sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py
==============================================================================
--- sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py (original)
+++ sandbox/numeric_bindings/libs/numeric/bindings/tools/netlib.py 2009-12-18 03:20:09 EST (Fri, 18 Dec 2009)
@@ -8,7 +8,7 @@
 # http://www.boost.org/LICENSE_1_0.txt)
 #
 
-import re, os.path, copy
+import re, os.path, copy, bindings
 from types import StringType
 
 # for debugging purposes
@@ -187,12 +187,10 @@
   if result != None:
     if properties[ 'value_type' ] == 'REAL' or properties[ 'value_type' ] == 'DOUBLE PRECISION':
       result = result.replace( "real_type", \
- "typename remove_imaginary< typename value" + \
- "< $FIRST_TYPENAME >::type >::type" )
+ "typename remove_imaginary< " + bindings.value_type( "$FIRST_TYPENAME" ) + ' >::type' )
     if properties[ 'value_type' ][ 0:7] == 'COMPLEX' or \
       properties[ 'value_type' ] == 'DOUBLE COMPLEX':
- result = result.replace( "value_type", "typename value" + \
- "< $FIRST_TYPENAME >::type" )
+ result = result.replace( "value_type", bindings.value_type( "$FIRST_TYPENAME" ) )
   return result
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk