Revision: 567
http://svn.sourceforge.net/pygccxml/?rev=567&view=rev
Author: roman_yakovenko
Date: 2006-09-20 12:57:24 -0700 (Wed, 20 Sep 2006)
Log Message:
-----------
small refactoring, that introduce new base class:
registration_based_t code creator. It keeps list of
associated global declaration creators
Modified Paths:
--------------
pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py
pyplusplus_dev/pyplusplus/code_creators/calldef.py
pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py
pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
pyplusplus_dev/pyplusplus/code_creators/declaration_based.py
pyplusplus_dev/pyplusplus/code_creators/enum.py
pyplusplus_dev/pyplusplus/code_creators/exception_translator.py
pyplusplus_dev/pyplusplus/code_creators/global_variable.py
pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py
pyplusplus_dev/pyplusplus/code_creators/member_variable.py
pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py
pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py
Added Paths:
-----------
pyplusplus_dev/pyplusplus/code_creators/registration_based.py
Modified: pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/array_1_registrator.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -6,18 +6,18 @@
import os
import algorithm
-import code_creator
+import registration_based
from pyplusplus import code_repository
from pyplusplus.decl_wrappers import call_policies
from pyplusplus.decl_wrappers import python_traits
from pygccxml import declarations
-class array_1_registrator_t( code_creator.code_creator_t ):
+class array_1_registrator_t( registration_based.registration_based_t ):
"""
This class creates code that register static sized array
"""
def __init__( self, array_type ):
- code_creator.code_creator_t.__init__( self )
+ registration_based.registration_based_t.__init__( self )
self._array_type = array_type
self._call_policies = self._guess_call_policies()
self.works_on_instance = False
Modified: pyplusplus_dev/pyplusplus/code_creators/calldef.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/calldef.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/calldef.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -7,6 +7,7 @@
import algorithm
import code_creator
import declaration_based
+import registration_based
import class_declaration
from pygccxml import declarations
from pyplusplus import decl_wrappers
@@ -26,8 +27,10 @@
#protected member functions - call, override
#private - override
-class calldef_t( declaration_based.declaration_based_t):
+class calldef_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
def __init__(self, function, wrapper=None ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=function )
self._wrapper = wrapper
self._associated_decl_creators = []
@@ -154,8 +157,10 @@
return ''.join( result )
-class calldef_wrapper_t( declaration_based.declaration_based_t):
+class calldef_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t):
def __init__(self, function ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=function )
def argument_name( self, index ):
@@ -795,22 +800,6 @@
mem_fun_private_pv_wrapper_t = mem_fun_private_v_wrapper_t
-
-#class protected_helper_t( object ):
- #def __init__( self ):
- #object.__init__( self )
-
- #def wclass_inst_arg_type( self ):
- #inst_arg_type = declarations.declarated_t( self.declaration.parent )
- #if self.declaration.has_const:
- #inst_arg_type = declarations.const_t(inst_arg_type)
- #inst_arg_type = declarations.reference_t(inst_arg_type)
- #return inst_arg_type
-
- #def wclass_inst_arg( self ):
- #return self.wclass_inst_arg_type().decl_string + ' wcls_inst'
-
-
class constructor_t( calldef_t ):
"""
Creates boost.python code needed to expose constructor.
@@ -867,11 +856,13 @@
code = self.parent.class_var_name + '.' + code + ';'
return code
-class static_method_t( declaration_based.declaration_based_t ):
+class static_method_t( declaration_based.declaration_based_t
+ , registration_based.registration_based_t ):
"""
Creates boost.python code that expose member function as static function.
"""
def __init__(self, function, function_code_creator=None ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=function )
self._function_code_creator = function_code_creator
@@ -932,11 +923,13 @@
#There are usecases when boost.python requeres
#constructor for wrapper class from exposed class
#I should understand this more
-class copy_constructor_wrapper_t( declaration_based.declaration_based_t ):
+class copy_constructor_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates wrapper class constructor from wrapped class instance.
"""
def __init__( self, class_inst ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=class_inst )
def _create_declaration(self):
@@ -968,11 +961,13 @@
return os.linesep.join( answer )
-class null_constructor_wrapper_t( declaration_based.declaration_based_t ):
+class null_constructor_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates wrapper for compiler generated null constructor.
"""
def __init__( self, class_inst ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=class_inst )
def _create_constructor_call( self ):
@@ -992,7 +987,8 @@
#in python all operators are members of class, while in C++
#you can define operators that are not.
-class operator_t( declaration_based.declaration_based_t ):
+class operator_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Creates boost.python code needed to expose supported subset of C++ operators.
"""
@@ -1002,9 +998,8 @@
BOTH = 'both'
def __init__(self, operator ):
- declaration_based.declaration_based_t.__init__( self
- , declaration=operator
- )
+ registration_based.registration_based_t.__init__( self )
+ declaration_based.declaration_based_t.__init__( self, declaration=operator )
def _call_type_constructor( self, type ):
x = declarations.remove_reference( type )
@@ -1066,11 +1061,13 @@
code = self._create_unary_operator()
return 'def( %s )' % code
-class casting_operator_t( declaration_based.declaration_based_t ):
+class casting_operator_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Creates boost.python code needed to register type conversions( implicitly_convertible )
"""
def __init__( self, operator ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=operator )
def _create_impl(self):
@@ -1085,13 +1082,15 @@
, [ from_arg , to_arg ] ) \
+ '();'
-class casting_member_operator_t( declaration_based.declaration_based_t ):
+class casting_member_operator_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Creates boost.python code needed to register casting operators. For some
operators Pythonic name is given: __int__, __long__, __float__, __str__
"""
def __init__( self, operator ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=operator )
def _create_impl(self):
@@ -1118,13 +1117,15 @@
, 'doc' : doc
}
-class casting_constructor_t( declaration_based.declaration_based_t ):
+class casting_constructor_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Creates boost.python code needed to register type conversions( implicitly_convertible ).
This case treat situation when class has public non explicit constuctor from
another type.
"""
def __init__( self, constructor ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=constructor )
def _create_impl(self):
@@ -1221,9 +1222,9 @@
, 'max' : max_
}
-class calldef_overloads_t( code_creator.code_creator_t ):
+class calldef_overloads_t( registration_based.registration_based_t ):
def __init__( self, overloads_class ):
- code_creator.code_creator_t.__init__( self )
+ registration_based.registration_based_t.__init__( self )
self._overloads_class = overloads_class
@property
Modified: pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/calldef_transformed.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -502,4 +502,3 @@
self.declaration.arguments = self._subst_manager.wrapper_func.arg_list
return answer
-
Modified: pyplusplus_dev/pyplusplus/code_creators/class_declaration.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/class_declaration.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -10,11 +10,14 @@
import algorithm
import smart_pointers
import declaration_based
+import registration_based
from pygccxml import declarations
-class class_declaration_t( scoped.scoped_t ):
+class class_declaration_t( scoped.scoped_t
+ , registration_based.registration_based_t ):
def __init__(self, class_inst ):
scoped.scoped_t.__init__( self, declaration=class_inst )
+ registration_based.registration_based_t.__init__( self )
self.works_on_instance = False
def _generate_class_definition(self):
@@ -78,12 +81,13 @@
return self._generate_code_no_scope()
-class class_t( scoped.scoped_t ):
+class class_t( scoped.scoped_t, registration_based.registration_based_t ):
"""
Creates boost.python code that needed to export a class
"""
def __init__(self, class_inst, wrapper=None ):
scoped.scoped_t.__init__( self, declaration=class_inst )
+ registration_based.registration_based_t.__init__( self )
self._wrapper = wrapper
self.works_on_instance = False
self._associated_decl_creators = []
Modified: pyplusplus_dev/pyplusplus/code_creators/declaration_based.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/declaration_based.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/declaration_based.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -6,7 +6,7 @@
import algorithm
import code_creator
-class declaration_based_t(code_creator.code_creator_t):
+class declaration_based_t:
"""Code creator that is based on a declaration.
"""
def __init__(self, declaration ):
@@ -17,12 +17,8 @@
@param parent: Parent code creator.
@type parent: code_creator_t
"""
- code_creator.code_creator_t.__init__(self)
self._decl = declaration
- def _create_impl(self):
- raise NotImplementedError()
-
def _generate_valid_name(self, name=None):
if name == None:
name = self.declaration.name
@@ -49,4 +45,5 @@
def documentation( self ):
if None is self.declaration.documentation:
return ''
- return self.declaration.documentation
\ No newline at end of file
+ return self.declaration.documentation
+
\ No newline at end of file
Modified: pyplusplus_dev/pyplusplus/code_creators/enum.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/enum.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/enum.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -6,12 +6,15 @@
import os
import algorithm
import declaration_based
+import registration_based
-class enum_t( declaration_based.declaration_based_t ):
+class enum_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Creates boost.python code that expose C++ enum
"""
def __init__(self, enum ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=enum)
self.works_on_instance = False
Modified: pyplusplus_dev/pyplusplus/code_creators/exception_translator.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/exception_translator.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/exception_translator.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -8,10 +8,13 @@
import algorithm
import code_creator
import declaration_based
+import registration_based
from pygccxml import declarations
-class exception_translator_t( declaration_based.declaration_based_t ):
+class exception_translator_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
def __init__(self, exception_class ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=exception_class )
@property
@@ -28,8 +31,10 @@
, 'arg_name' : self.declaration.exception_argument_name }
-class exception_translator_register_t( declaration_based.declaration_based_t ):
+class exception_translator_register_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
def __init__(self, exception_class, exception_translator):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=exception_class )
self.works_on_instance = False
self.translator = exception_translator
Modified: pyplusplus_dev/pyplusplus/code_creators/global_variable.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/global_variable.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/global_variable.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -6,17 +6,21 @@
import os
import pygccxml
import algorithm
+import code_creator
import declaration_based
+import registration_based
from pygccxml import declarations
from pyplusplus import code_repository
#TODO: if variable is not const, then export it using boost::python::ptr
-class global_variable_base_t( declaration_based.declaration_based_t ):
+class global_variable_base_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Base class for all global variables code creators. Mainly exists to
simplify file writers algorithms.
"""
def __init__(self, variable, wrapper=None ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
self._wrapper = wrapper
@@ -60,12 +64,14 @@
answer.append( '();' )
return ''.join( answer )
-class array_gv_wrapper_t( declaration_based.declaration_based_t ):
+class array_gv_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates C++ code that register array class.
"""
def __init__(self, variable ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
def _get_wrapper_type( self ):
Modified: pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/indexing_suites.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -8,10 +8,13 @@
import algorithm
import code_creator
import declaration_based
+import registration_based
from pygccxml import declarations
-class indexing_suite1_t( declaration_based.declaration_based_t ):
+class indexing_suite1_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
def __init__(self, container ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=container )
def _get_configuration( self ):
@@ -47,8 +50,10 @@
return "def( %s() )" % self._create_suite_declaration()
-class indexing_suite2_t( declaration_based.declaration_based_t ):
+class indexing_suite2_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
def __init__(self, container ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=container )
self.__method_mask_var_name = "methods_mask"
self.works_on_instance = not self.does_user_disable_methods()
@@ -104,8 +109,10 @@
answer.append( ';' )
return ''.join( answer )
-class value_traits_t( declaration_based.declaration_based_t ):
+class value_traits_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
def __init__( self, value_class ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=value_class )
def generate_value_traits( self ):
Modified: pyplusplus_dev/pyplusplus/code_creators/member_variable.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/member_variable.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -5,19 +5,23 @@
import os
import algorithm
+import code_creator
import declaration_based
from pyplusplus import code_repository
from pyplusplus.decl_wrappers import call_policies
from pyplusplus.decl_wrappers import python_traits
+import registration_based
from pygccxml import declarations
-class member_variable_base_t( declaration_based.declaration_based_t ):
+class member_variable_base_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
"""
Base class for all member variables code creators. Mainly exists to
simplify file writers algorithms.
"""
def __init__(self, variable, wrapper=None ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
self._wrapper = wrapper
@@ -131,13 +135,14 @@
def _create_impl(self):
return self._generate_variable()
-class member_variable_wrapper_t( declaration_based.declaration_based_t ):
+class member_variable_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates C++ code that creates accessor for pointer class variables
"""
#TODO: give user a way to set call policies
# treat void* pointer
- indent = declaration_based.declaration_based_t.indent
+ indent = code_creator.code_creator_t.indent
MV_GET_TEMPLATE = os.linesep.join([
'static %(type)s get_%(name)s(%(cls_type)s inst ){'
, indent( 'return inst.%(name)s;' )
@@ -167,6 +172,7 @@
])
def __init__(self, variable ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
def _get_getter_full_name(self):
@@ -273,12 +279,13 @@
answer[i] = os.linesep + self.indent( self.indent( self.indent( answer[i] ) ) )
return ''.join( answer )
-class bit_field_wrapper_t( declaration_based.declaration_based_t ):
+class bit_field_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates C++ code that creates accessor for bit fields
"""
- indent = declaration_based.declaration_based_t.indent
+ indent = code_creator.code_creator_t.indent
BF_GET_TEMPLATE = os.linesep.join([
'%(type)s get_%(name)s() const {'
, indent( 'return %(name)s;' )
@@ -294,6 +301,7 @@
])
def __init__(self, variable ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
def _get_getter_full_name(self):
@@ -370,12 +378,14 @@
#TODO: generated fucntion should be static and take instance of the wrapped class
#as first argument.
-class array_mv_wrapper_t( declaration_based.declaration_based_t ):
+class array_mv_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates C++ code that register array class.
"""
def __init__(self, variable ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
def _get_wrapper_type( self ):
@@ -477,12 +487,13 @@
answer.append( "%s.%s;" % (class_var_name, self._create_setter() ) )
return ''.join( answer )
-class mem_var_ref_wrapper_t( declaration_based.declaration_based_t ):
+class mem_var_ref_wrapper_t( code_creator.code_creator_t
+ , declaration_based.declaration_based_t ):
"""
Creates C++ code that creates accessor for class member variable, that has type reference.
"""
- indent = declaration_based.declaration_based_t.indent
+ indent = code_creator.code_creator_t.indent
GET_TEMPLATE = os.linesep.join([
'static %(type)s get_%(name)s( %(class_type)s& inst ) {'
, indent( 'return inst.%(name)s;' )
@@ -498,6 +509,7 @@
])
def __init__(self, variable ):
+ code_creator.code_creator_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=variable)
def _get_getter_full_name(self):
Added: pyplusplus_dev/pyplusplus/code_creators/registration_based.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/registration_based.py (rev 0)
+++ pyplusplus_dev/pyplusplus/code_creators/registration_based.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -0,0 +1,21 @@
+# Copyright 2004 Roman Yakovenko.
+# Distributed under the Boost Software License, Version 1.0. (See
+# accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+import algorithm
+import code_creator
+
+class registration_based_t(code_creator.code_creator_t):
+ """Code creator that is based on a declaration.
+ """
+ def __init__(self, associated_decl_creators=None ):
+ code_creator.code_creator_t.__init__(self)
+ if None is associated_decl_creators:
+ associated_decl_creators = []
+ self._associated_decl_creators = associated_decl_creators
+
+ @property
+ def associated_decl_creators( self ):
+ """ references to global declaration code creators. """
+ return self._associated_decl_creators
Modified: pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/smart_pointers.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -5,8 +5,10 @@
import os
import algorithm
+import declaration_based
+import registration_based
from pygccxml import declarations
-import declaration_based
+
templates = declarations.templates
class held_type_t(object):
@@ -32,13 +34,15 @@
arg = algorithm.create_identifier( creator, creator.declaration.decl_string )
return templates.join( smart_ptr, [ arg ] )
-class smart_pointer_registrator_t( declaration_based.declaration_based_t ):
+class smart_pointer_registrator_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
""" Convertor for boost::python::register_ptr_to_python<PTR>.
Lets boost python know that it can use smart_ptr to hold a an object.
See: http://www.boost.org/libs/python/doc/v2/register_ptr_to_python.html
"""
def __init__( self, smart_ptr, class_creator ):
""" smart_ptr: string of ptr type. Ex: 'boost::shared_ptr' """
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, class_creator.declaration )
self._smart_ptr = smart_ptr
self._class_creator = class_creator
@@ -67,13 +71,15 @@
held_type = held_type_t(self.smart_ptr).create( self )
return templates.join( rptp, [ held_type ] ) + '();'
-class smart_pointers_converter_t( declaration_based.declaration_based_t ):
+class smart_pointers_converter_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
""" creator for boost::python::implicitly_convertible.
This creates a statemnt that allows the usage of C++ implicit
conversion from source to target.
See: http://www.boost.org/libs/python/doc/v2/implicit.html
"""
def __init__( self, smart_ptr, source, target ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, source )
self._target = target
self._smart_ptr = smart_ptr
Modified: pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py
===================================================================
--- pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py 2006-09-20 18:26:26 UTC (rev 566)
+++ pyplusplus_dev/pyplusplus/code_creators/unnamed_enum.py 2006-09-20 19:57:24 UTC (rev 567)
@@ -7,9 +7,12 @@
import pygccxml
import algorithm
import declaration_based
+import registration_based
-class unnamed_enum_t( declaration_based.declaration_based_t ):
+class unnamed_enum_t( registration_based.registration_based_t
+ , declaration_based.declaration_based_t ):
def __init__(self, unnamed_enum ):
+ registration_based.registration_based_t.__init__( self )
declaration_based.declaration_based_t.__init__( self, declaration=unnamed_enum)
self.works_on_instance = False
@@ -26,4 +29,5 @@
for name, value in self.declaration.values:
result.append( tmpl % ( self.value_aliases.get( name, name )
, algorithm.create_identifier( self, full_name + '::' + name ) ) )
- return os.linesep.join( result )
\ No newline at end of file
+ return os.linesep.join( result )
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|