Update of /cvsroot/pygccxml/source/pyplusplus/decl_wrappers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28954/pyplusplus/decl_wrappers
Modified Files:
algorithm.py call_policies.py calldef_wrapper.py
decl_wrapper.py decl_wrapper_printer.py mdecl_wrapper.py
namespace_wrapper.py scopedef_wrapper.py
Log Message:
There are a lot of changes, sorry CVS did not worked for week or something like this
Changes
1. Lots of code clean up
2. Adding and updating documentation
3. Adding new method on decl_wrapper - readme. This method will return list of msgs to the developer.
For example if function takes by reference fundamental type it will say that this function could not be called from Python
4. Logging functionlity has been added to file writers too
5. Few bug fixes
6. For operator [] call policies is always set.
Index: mdecl_wrapper.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/mdecl_wrapper.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mdecl_wrapper.py 6 Mar 2006 05:02:41 -0000 1.1
--- mdecl_wrapper.py 6 Apr 2006 06:15:59 -0000 1.2
***************
*** 5,8 ****
--- 5,9 ----
class call_redirector_t( object ):
+ """Internal class used to call some function of objects"""
def __init__( self, name, decls ):
object.__init__( self )
***************
*** 12,27 ****
def __call__( self, *arguments, **keywords ):
for d in self.decls:
! callable = getattr(d, self.name)
! callable( *arguments, **keywords )
class mdecl_wrapper_t( object ):
def __init__( self, decls ):
object.__init__( self )
self.__dict__['_decls'] = decls
def __len__( self ):
return len( self._decls )
def __getitem__( self, index ):
return self._decls[index]
--- 13,46 ----
def __call__( self, *arguments, **keywords ):
for d in self.decls:
! callable_ = getattr(d, self.name)
! callable_( *arguments, **keywords )
class mdecl_wrapper_t( object ):
+ """Multiple declarations wrapper.
+
+ The main purpose of this class is to allow an user to work on many
+ declarations, as they were only one single declaration.
+
+ Example:
+ mb = module_builder_t( ... )
+ #lets say we want to exclude all member functions, that returns reference to int:
+ mb.member_functions( return_type='int &' ).exclude()
+
+ "exclude" function will be called on every function that match the criteria.
+ """
+
def __init__( self, decls ):
+ """@param decls: list of declarations to operate on.
+ @type decls: list of L{declaration wrappers<decl_wrapper_t>}
+ """
object.__init__( self )
self.__dict__['_decls'] = decls
def __len__( self ):
+ """returns the number of declarations"""
return len( self._decls )
def __getitem__( self, index ):
+ """provides access to declaration"""
return self._decls[index]
***************
*** 32,35 ****
--- 51,58 ----
def __setattr__( self, name, value ):
+ """Updates the value of attribute on all declarations.
+ @param name: name of attribute
+ @param value: new value of attribute
+ """
self.__ensure_attribute( name )
for d in self._decls:
***************
*** 37,39 ****
--- 60,64 ----
def __getattr__( self, name ):
+ """@param name: name of method
+ """
return call_redirector_t( name, self._decls )
\ No newline at end of file
Index: call_policies.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/call_policies.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** call_policies.py 22 Mar 2006 08:05:35 -0000 1.2
--- call_policies.py 6 Apr 2006 06:15:59 -0000 1.3
***************
*** 8,19 ****
--- 8,29 ----
class CREATION_POLICY:
+ """Implementation details"""
AS_INSTANCE = 'as instance'
AS_TEMPLATE_ARGUMENT = 'as template argument'
class call_policy_t(object):
+ """Base class for all call polices classes"""
def __init__(self):
object.__init__(self)
def create(self, function_creator, creation_policy=CREATION_POLICY.AS_INSTANCE):
+ """Creates code from the call policies class instance.
+ @param function_creator: parent code creator
+ @type function_creator: L{code_creators.function_t} or L{code_creators.constructor_t}
+
+ @param creation_policy: indicates whether we this call policy used as template
+ argument or as an instance
+ @type creation_policy: L{CREATION_POLICY}
+ """
code = self._create_impl( function_creator )
if creation_policy == CREATION_POLICY.AS_INSTANCE:
***************
*** 25,28 ****
--- 35,39 ----
class default_t(call_policy_t):
+ """implementation for ::boost::python::default_call_policies"""
def __init__( self ):
call_policy_t.__init__( self )
***************
*** 35,38 ****
--- 46,50 ----
def default_call_policies():
+ """create ::boost::python::default_call_policies"""
return default_t()
Index: scopedef_wrapper.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/scopedef_wrapper.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** scopedef_wrapper.py 30 Mar 2006 05:56:17 -0000 1.7
--- scopedef_wrapper.py 6 Apr 2006 06:15:59 -0000 1.8
***************
*** 9,14 ****
from sets import Set as set
import time
! class scopedef_t(decl_wrapper.decl_wrapper_t):
RECURSIVE_DEFAULT = True
ALLOW_EMPTY_MDECL_WRAPPER = False
--- 9,56 ----
from sets import Set as set
import time
+ from pyplusplus import _logging_
! class scopedef_t(decl_wrapper.decl_wrapper_t):
! """In C++ there are 2 declarations that can contain definition of other
! declarations: class and namespace. This class is used as abase class for both
! of them.
!
! Also this class provides "get/select/find" interface. Using this class you
! can get instance or instances of internal declaration(s).
!
! You can find declaration(s) using next criteria:
! 1. name - declaration name, could be full qualified name
! 2. header_dir - directory, to which belongs file, that the declaration was declarated in.
! header_dir should be absolute path.
! 3. header_file - file that the declaration was declarated in.
! 4. function - user ( your ) custom criteria. The interesting thing is that
! this function will be joined with other arguments ( criteria ).
! 5 recursive - the search declaration range, if True will be search in
! internal declarations too.
!
! Every "select" API you can invoke and pass as first argument at declaration
! name or function. This class will find out correctly what argument represents.
!
! Example:
! ns - referers to global namespace
! ns.member_function( "do_something ) - will return reference to member
! function named "do_something". If there is no such function exception
! will be raised. If there is more then one function exception will be
! raised too.
!
! Example 2:
! ns - referers to global namespace
! do_smths = ns.member_functions( "do_something ) - will return instance
! of L{mdecl_wrapper_t} object. This object allows you few things:
!
! 1. To iterate on selected declarations
! 2. To set some property to desired value using one line of code only:
! do_smths.call_policies = x
! 3. To call some function on every instance using one line of code:
! do_smths.exclude()
!
! Pay attention: you can not use "get" functions or properties.
! """
!
RECURSIVE_DEFAULT = True
ALLOW_EMPTY_MDECL_WRAPPER = False
***************
*** 41,44 ****
--- 83,87 ----
def clear_optimizer(self):
+ """Cleans query optimizer state"""
self.__optimized = False
self.__type2decls = {}
***************
*** 47,54 ****
self.__type2name2decls_nr = {}
self.__all_decls = None
!
def init_optimizer(self):
self.clear_optimizer()
- #start_time = time.clock()
decl_types = [ declarations.scopedef_t
--- 90,114 ----
self.__type2name2decls_nr = {}
self.__all_decls = None
!
! map( lambda decl: decl.clear_optimizer()
! , filter( lambda decl: isinstance( decl, declarations.scopedef_t )
! , self.declarations ) )
!
def init_optimizer(self):
+ """Initializes query optimizer state.
+ There are 4 internals hash tables:
+ 1. from type to declarations
+ 2. from type to declarations for non-recursive queries
+ 3. from type to name to declarations
+ 4. from type to name to declarations for non-recursive queries
+
+ Almost every query includes declaration type information. Also very
+ common query is to search some declaration(s) by name or full name.
+ Those hashtables allows to search declaration very quick.
+ """
+ _logging_.logger.debug( "preparing data structures for query optimizer - started" )
+ start_time = time.clock()
+
self.clear_optimizer()
decl_types = [ declarations.scopedef_t
***************
*** 92,105 ****
name2decls_nr[ decl.name ].append( decl )
! #decl_wrapper.logger.info( 'Time took to optimize data strucutres:
! #print 'time taken : ', time.clock() - start_time, ' seconds'
!
self.__optimized = True
def exclude( self ):
self.ignore = True
map( lambda decl: decl.exclude(), self.declarations )
def include( self ):
self.ignore = False
map( lambda decl: decl.include(), self.declarations )
--- 152,170 ----
name2decls_nr[ decl.name ].append( decl )
! map( lambda decl: decl.init_optimizer()
! , filter( lambda decl: isinstance( decl, declarations.scopedef_t )
! , self.declarations ) )
!
! _logging_.logger.debug( "preparing data structures for query optimizer - done( %f seconds ). "
! % ( time.clock() - start_time ) )
self.__optimized = True
def exclude( self ):
+ """Exclude "self" and child declarations from being exposed."""
self.ignore = True
map( lambda decl: decl.exclude(), self.declarations )
def include( self ):
+ """Include "self" and child declarations to be exposed."""
self.ignore = False
map( lambda decl: decl.include(), self.declarations )
***************
*** 137,149 ****
matcher = match_class( **matcher_args )
if keywds['function']:
! decl_wrapper.logger.info( 'running query: %s and <user defined function>' % str( matcher ) )
return lambda decl: matcher( decl ) and keywds['function'](decl)
else:
! decl_wrapper.logger.info( 'running query: %s' % str( matcher ) )
return matcher
def __findout_range( self, name, decl_type, recursive ):
if not self.__optimized:
! decl_wrapper.logger.info( 'running non optimized query - optimization has not been done' )
decls = self.declarations
if recursive:
--- 202,214 ----
matcher = match_class( **matcher_args )
if keywds['function']:
! _logging_.logger.info( 'running query: %s and <user defined function>' % str( matcher ) )
return lambda decl: matcher( decl ) and keywds['function'](decl)
else:
! _logging_.logger.info( 'running query: %s' % str( matcher ) )
return matcher
def __findout_range( self, name, decl_type, recursive ):
if not self.__optimized:
! _logging_.logger.info( 'running non optimized query - optimization has not been done' )
decls = self.declarations
if recursive:
***************
*** 156,180 ****
name = matcher.decl_name_only
if recursive:
! decl_wrapper.logger.info( 'running type + name optimized query recursively' )
return self.__type2name2decls[decl_type][name]
else:
! decl_wrapper.logger.info( 'running type + name optimized query non recursively' )
return self.__type2name2decls_nr[decl_type][name]
elif decl_type:
if recursive:
! decl_wrapper.logger.info( 'running type optimized query recursively' )
return self.__type2decls[ decl_type ]
else:
! decl_wrapper.logger.info( 'running type optimized query non recursively' )
return self.__type2decls_nr[ decl_type ]
else:
- decl_wrapper.logger.info( 'running non optimized query - query is more complex then type + name' )
if recursive:
return self.__all_decls
else:
return self.declarations
def _find_single( self, match_class, **keywds ):
! decl_wrapper.logger.info( 'running query - started' )
start_time = time.clock()
norm_keywds = self.__normalize_args( **keywds )
--- 221,246 ----
name = matcher.decl_name_only
if recursive:
! _logging_.logger.info( 'query has been optimized on type and name' )
return self.__type2name2decls[decl_type][name]
else:
! _logging_.logger.info( 'non recursive query has been optimized on type and name' )
return self.__type2name2decls_nr[decl_type][name]
elif decl_type:
if recursive:
! _logging_.logger.info( 'query has been optimized on type' )
return self.__type2decls[ decl_type ]
else:
! _logging_.logger.info( 'non recursive query has been optimized on type' )
return self.__type2decls_nr[ decl_type ]
else:
if recursive:
+ _logging_.logger.info( 'query has not been optimized ( hint: query does not contain type and/or name )' )
return self.__all_decls
else:
+ _logging_.logger.info( 'non recursive query has not been optimized ( hint: query does not contain type and/or name )' )
return self.declarations
def _find_single( self, match_class, **keywds ):
! _logging_.logger.info( 'find single query execution - started' )
start_time = time.clock()
norm_keywds = self.__normalize_args( **keywds )
***************
*** 184,192 ****
decls = self.__findout_range( norm_keywds['name'], dtype, recursive_ )
found = declarations.matcher.get_single( matcher, decls, False )
! decl_wrapper.logger.info( 'query execution took : %f seconds' % ( time.clock() - start_time ) )
! decl_wrapper.logger.info( 'running query - done' )
return found
def _find_multiple( self, match_class, **keywds ):
start_time = time.clock()
norm_keywds = self.__normalize_args( **keywds )
--- 250,259 ----
decls = self.__findout_range( norm_keywds['name'], dtype, recursive_ )
found = declarations.matcher.get_single( matcher, decls, False )
! _logging_.logger.info( 'find single query execution - done( %f seconds )'
! % ( time.clock() - start_time ) )
return found
def _find_multiple( self, match_class, **keywds ):
+ _logging_.logger.info( 'find all query execution - started' )
start_time = time.clock()
norm_keywds = self.__normalize_args( **keywds )
***************
*** 197,208 ****
found = declarations.matcher.find( matcher, decls, False )
mfound = mdecl_wrapper.mdecl_wrapper_t( found )
! decl_wrapper.logger.info( 'There are %d declarations that match query' % len(mfound) )
if not mfound and not self.ALLOW_EMPTY_MDECL_WRAPPER:
raise RuntimeError( "Multi declaration query returned 0 declarations." )
-
- decl_wrapper.logger.info( 'query execution took : %f seconds' % ( time.clock() - start_time ) )
return mfound
def decl( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
return self._find_single( declarations.declaration_matcher_t
, name=name
--- 264,276 ----
found = declarations.matcher.find( matcher, decls, False )
mfound = mdecl_wrapper.mdecl_wrapper_t( found )
! _logging_.logger.info( '%d declaration(s) that match query' % len(mfound) )
! _logging_.logger.info( 'find single query execution - done( %f seconds )'
! % ( time.clock() - start_time ) )
if not mfound and not self.ALLOW_EMPTY_MDECL_WRAPPER:
raise RuntimeError( "Multi declaration query returned 0 declarations." )
return mfound
def decl( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
+ """Finds any declaration by criteria. Please see L{scopedef_t} for full explanation."""
return self._find_single( declarations.declaration_matcher_t
, name=name
***************
*** 242,245 ****
--- 310,314 ----
, name=name
, function=function
+ , type=type
, header_dir=header_dir
, header_file=header_file
***************
*** 250,253 ****
--- 319,323 ----
, name=name
, function=function
+ , type=type
, header_dir=header_dir
, header_file=header_file
***************
*** 344,348 ****
, recursive=recursive)
! def member_operator( self, name=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
return self._find_single( declarations.operator_matcher_t
, name=name
--- 414,418 ----
, recursive=recursive)
! def member_operator( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
return self._find_single( declarations.operator_matcher_t
, name=name
***************
*** 356,360 ****
, recursive=recursive )
! def member_operators( self, name=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
return self._find_multiple( declarations.operator_matcher_t
, name=name
--- 426,430 ----
, recursive=recursive )
! def member_operators( self, name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None ):
return self._find_multiple( declarations.operator_matcher_t
, name=name
***************
*** 398,402 ****
, header_file=header_file
, recursive=recursive)
!
def enumerations( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
return self._find_multiple( declarations.declaration_matcher_t
--- 468,474 ----
, header_file=header_file
, recursive=recursive)
! #adding small aliase
! enum = enumeration
!
def enumerations( self, name=None, function=None, header_dir=None, header_file=None, recursive=None ):
return self._find_multiple( declarations.declaration_matcher_t
***************
*** 407,409 ****
, header_file=header_file
, recursive=recursive)
!
--- 479,482 ----
, header_file=header_file
, recursive=recursive)
! #adding small aliase
! enums = enumerations
Index: decl_wrapper.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/decl_wrapper.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** decl_wrapper.py 29 Mar 2006 04:23:45 -0000 1.4
--- decl_wrapper.py 6 Apr 2006 06:15:59 -0000 1.5
***************
*** 4,11 ****
# http://www.boost.org/LICENSE_1_0.txt)
- from pygccxml import declarations
- import algorithm
import sys
! import logging
__REPOTED_REPLACES = []
--- 4,13 ----
# http://www.boost.org/LICENSE_1_0.txt)
import sys
! import algorithm
! from pyplusplus import _logging_
! from pygccxml import declarations
!
!
__REPOTED_REPLACES = []
***************
*** 16,26 ****
__REPOTED_REPLACES.append( msg )
- #TODO: find better place for it
- logger = logging.getLogger('pyplusplus')
- __handler = logging.StreamHandler(sys.stdout)
- __handler.setFormatter( logging.Formatter('%(message)s') )
- logger.addHandler(__handler)
- logger.setLevel(logging.DEBUG)
-
class ERROR_BEHAVIOUR:
PRINT = 'print'
--- 18,21 ----
***************
*** 28,31 ****
--- 23,35 ----
class decl_wrapper_t(object):
+ """Declaration interface.
+
+ This class represents the interface to the declaration tree. Its
+ main purpose is to "decorate" the nodes in the tree with
+ information about how the binding is to be created. Instances of
+ this class are never created by the user, instead they are
+ returned by the API.
+ """
+
def __init__(self):
object.__init__(self)
***************
*** 42,49 ****
return self._alias
elif declarations.templates.is_instantiation( self.name ):
! valid_name = self._generate_valid_name()
! #I don't think user should see this, but I could be wrong
! #report_msg_once('replacing name "%s" with "%s"' % (self.name, valid_name) )
! return valid_name
else:
return self.name
--- 46,50 ----
return self._alias
elif declarations.templates.is_instantiation( self.name ):
! return self._generate_valid_name()
else:
return self.name
***************
*** 51,55 ****
def _set_alias(self, alias):
self._alias = alias
! alias = property( _get_alias, _set_alias )
def rename( self, new_name ):
--- 52,57 ----
def _set_alias(self, alias):
self._alias = alias
! alias = property( _get_alias, _set_alias
! , doc="Using this property you can easily change Python name of declaration" )
def rename( self, new_name ):
***************
*** 60,87 ****
def _set_ignore( self, value ):
self._ignore = value
! ignore = property( _get_ignore, _set_ignore )
!
def exclude( self ):
self.ignore = True
def include( self ):
self.ignore = False
#I think that almost every declaration could have some wrapper. This is the
#main reason why those 3 functions does not have some well defined interface.
! def has_wrapper( self ):
! return False
! def _finalize_impl( self, error_behaviour ):
! pass
! def finalize( self, error_behaviour=None):
! try:
! self._finalize_impl( self )
! except Exception, error:
! if None is error_behaviour or error_behaviour == ERROR_BEHAVIOUR.PRINT:
! print 'Unable to finalize declaration: ', str( error )
! else:
! raise
!
\ No newline at end of file
--- 62,98 ----
def _set_ignore( self, value ):
self._ignore = value
! ignore = property( _get_ignore, _set_ignore
! ,doc="If you set ignore to True then this declaration will not be exported." )
def exclude( self ):
+ """Exclude "self" and child declarations from being exposed."""
self.ignore = True
def include( self ):
+ """Include "self" and child declarations to be exposed."""
self.ignore = False
+ #TODO:
#I think that almost every declaration could have some wrapper. This is the
#main reason why those 3 functions does not have some well defined interface.
! #def has_wrapper( self ):
! #return False
! #def _finalize_impl( self, error_behaviour ):
! #pass
! #def finalize( self, error_behaviour=None):
! #try:
! #self._finalize_impl( self )
! #except Exception, error:
! #if None is error_behaviour or error_behaviour == ERROR_BEHAVIOUR.PRINT:
! #print 'Unable to finalize declaration: ', str( error )
! #else:
! #raise
! def readme( calldef ):
! """This function will returns some hints/tips/description of problems
! that applied to the declarations. For example function that has argument
! reference to some fundamental type could be exported, but could not be called
! from Python
! """
! return []
Index: namespace_wrapper.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/namespace_wrapper.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** namespace_wrapper.py 30 Mar 2006 05:56:17 -0000 1.5
--- namespace_wrapper.py 6 Apr 2006 06:15:59 -0000 1.6
***************
*** 18,22 ****
, recursive=recursive )
! def namespaces( self, *args, **keywds ):
return self._find_multiple( declarations.namespace_matcher_t
, name=name
--- 18,22 ----
, recursive=recursive )
! def namespaces( self, name=None, function=None, recursive=None ):
return self._find_multiple( declarations.namespace_matcher_t
, name=name
Index: algorithm.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/algorithm.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** algorithm.py 8 Mar 2006 09:32:52 -0000 1.3
--- algorithm.py 6 Apr 2006 06:15:59 -0000 1.4
***************
*** 10,14 ****
import re
- import types
import pygccxml
--- 10,13 ----
***************
*** 104,106 ****
def _clone_impl( self ):
! return concrete_array_1_type_t( self._decl_string )
--- 103,105 ----
def _clone_impl( self ):
! return dummy_type_t( self._decl_string )
Index: calldef_wrapper.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/calldef_wrapper.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** calldef_wrapper.py 20 Mar 2006 05:47:56 -0000 1.3
--- calldef_wrapper.py 6 Apr 2006 06:15:59 -0000 1.4
***************
*** 4,7 ****
--- 4,8 ----
# http://www.boost.org/LICENSE_1_0.txt)
+ import os
import decl_wrapper
from pygccxml import declarations
***************
*** 23,31 ****
self._create_with_signature = False
! def _get_call_policies(self):
return self._call_policies
! def _set_call_policies(self, call_policies):
self._call_policies = call_policies
! call_policies = property( _get_call_policies, _set_call_policies )
def _get_use_keywords(self):
--- 24,32 ----
self._create_with_signature = False
! def get_call_policies(self):
return self._call_policies
! def set_call_policies(self, call_policies):
self._call_policies = call_policies
! call_policies = property( get_call_policies, set_call_policies )
def _get_use_keywords(self):
***************
*** 66,70 ****
else:
pass
!
class member_function_t( declarations.member_function_t, calldef_t ):
def __init__(self, *arguments, **keywords):
--- 67,89 ----
else:
pass
!
! def readme( self ):
! def suspicious_type( type_ ):
! if not declarations.is_reference( self.return_type ):
! return False
! type_no_ref = declarations.remove_reference( type_ )
! return not declarations.is_const( type_no_ref ) \
! and declarations.is_fundamental( type_no_ref )
! msg = []
! if suspicious_type( self.return_type ) and None is self.call_policies:
! msg.append( 'WARNING: Function "%s" returns non-const reference to C++ fundamental type - value can not be modified from Python.' % str( self ) )
! for index, arg in enumerate( self.arguments ):
! if suspicious_type( arg.type ):
! tmpl = 'WARNING: Function "%s" takes as argument (name=%s, pos=%d ) ' \
! + 'non-const reference to C++ fundamental type - ' \
! + 'function could not be called from Python.'
! msg.append( tmpl % ( str( self ), arg.name, index ) )
! return msg
!
class member_function_t( declarations.member_function_t, calldef_t ):
def __init__(self, *arguments, **keywords):
Index: decl_wrapper_printer.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pyplusplus/decl_wrappers/decl_wrapper_printer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** decl_wrapper_printer.py 6 Mar 2006 05:00:33 -0000 1.1
--- decl_wrapper_printer.py 6 Apr 2006 06:15:59 -0000 1.2
***************
*** 26,33 ****
if not self.print_details:
return
! self.writer( ' ' * (self.level+1) * self.INDENT_SIZE
! + "Alias: " + self.instance.alias + os.linesep )
! self.writer( ' ' * (self.level+1) * self.INDENT_SIZE
! + "Ignore: " + str( self.instance.ignore ) + os.linesep )
def print_calldef_wrapper(self):
--- 26,39 ----
if not self.print_details:
return
! intend_txt = ' ' * (self.level+1) * self.INDENT_SIZE
! self.writer( intend_txt + "Alias: " + self.instance.alias + os.linesep )
! self.writer( intend_txt + "Ignore: " + str( self.instance.ignore ) + os.linesep )
! if not self.instance.ignore:
! msgs = self.instance.readme()
! if msgs:
! self.writer( intend_txt + "ReadMe: " + os.linesep )
! more_intend_txt = ' ' * (self.level+2) * self.INDENT_SIZE
! for msg in msgs:
! self.writer( more_intend_txt + msg + os.linesep )
def print_calldef_wrapper(self):
|