Revision: 684
http://svn.sourceforge.net/pygccxml/?rev=684&view=rev
Author: roman_yakovenko
Date: 2006-10-24 12:18:07 -0700 (Tue, 24 Oct 2006)
Log Message:
-----------
adding base class for all transformers
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/function_transformers/transformers.py
Modified: pyplusplus_dev/pyplusplus/function_transformers/transformers.py
===================================================================
--- pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2006-10-24 19:10:52 UTC (rev 683)
+++ pyplusplus_dev/pyplusplus/function_transformers/transformers.py 2006-10-24 19:18:07 UTC (rev 684)
@@ -16,11 +16,12 @@
- L{output_array_t}
"""
import os
+import transformer
from pygccxml import declarations
from pyplusplus import code_repository
# output_t
-class output_t:
+class output_t( transformer.transformer_t ):
"""Handles a single output variable.
The specified variable is removed from the argument list and is turned
@@ -30,6 +31,7 @@
"""
def __init__(self, idx):
+ transformer.transformer_t.__init__( self )
"""Constructor.
The specified argument must be a reference or a pointer.
@@ -78,7 +80,7 @@
# input_t
-class input_t:
+class input_t(transformer.transformer_t):
"""Handles a single input variable.
The reference on the specified variable is removed.
@@ -94,6 +96,7 @@
@param idx: Index of the argument that is an output value (the first arg has index 1).
@type idx: int
"""
+ transformer.transformer_t.__init__( self )
self.idx = idx
def __str__(self):
@@ -115,7 +118,7 @@
sm.insert_arg(self.idx, noref_arg, arg.name)
# inout_t
-class inout_t:
+class inout_t(transformer.transformer_t):
"""Handles a single input/output variable.
void foo(int& v) -> v = foo(v)
@@ -129,6 +132,7 @@
@param idx: Index of the argument that is an in/out value (the first arg has index 1).
@type idx: int
"""
+ transformer.transformer_t.__init__( self )
self.idx = idx
self.local_var = "<not initialized>"
@@ -175,7 +179,7 @@
# input_array_t
-class input_array_t:
+class input_array_t(transformer.transformer_t):
"""Handles an input array with fixed size.
void setVec3(double* v) -> setVec3(object v)
@@ -194,6 +198,7 @@
@param size: The fixed size of the input array
@type size: int
"""
+ transformer.transformer_t.__init__( self )
self.idx = idx
self.size = size
@@ -267,7 +272,7 @@
# output_array_t
-class output_array_t:
+class output_array_t(transformer.transformer_t):
"""Handles an output array of a fixed size.
void getVec3(double* v) -> v = getVec3()
@@ -285,7 +290,7 @@
@param size: The fixed size of the output array
@type size: int
"""
-
+ transformer.transformer_t.__init__( self )
self.idx = idx
self.size = size
@@ -355,3 +360,4 @@
, 'ivar' : self.virtual_ivar
, 'array_name' : self.argname
}
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|