[pygccxml-commit] SF.net SVN: pygccxml:[1536] pygccxml_dev/pygccxml/declarations
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2009-01-05 22:06:07
|
Revision: 1536 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1536&view=rev Author: roman_yakovenko Date: 2009-01-05 22:06:06 +0000 (Mon, 05 Jan 2009) Log Message: ----------- adding [un]decorated names to the declarations Modified Paths: -------------- pygccxml_dev/pygccxml/declarations/decl_printer.py pygccxml_dev/pygccxml/declarations/declaration.py Modified: pygccxml_dev/pygccxml/declarations/decl_printer.py =================================================================== --- pygccxml_dev/pygccxml/declarations/decl_printer.py 2009-01-05 21:03:16 UTC (rev 1535) +++ pygccxml_dev/pygccxml/declarations/decl_printer.py 2009-01-05 22:06:06 UTC (rev 1536) @@ -120,6 +120,12 @@ if self.verbose and self.__inst.mangled: mangled = 'mangled: %s'%(self.__inst.mangled) self.writer( ' ' * curr_level * self.INDENT_SIZE + mangled + os.linesep) + if self.verbose and self.__inst.decorated_name: + decorated_name = 'decorated name: %s'%(self.__inst.decorated_name) + self.writer( ' ' * curr_level * self.INDENT_SIZE + decorated_name + os.linesep) + if self.verbose and self.__inst.undecorated_name: + undecorated_name = 'undecorated name: %s' % (self.__inst.undecorated_name) + self.writer( ' ' * curr_level * self.INDENT_SIZE + undecorated_name + os.linesep) def print_calldef_info(self, decl=None): """ Returns function signature: [retval, [arg1, ..., argN]]. """ Modified: pygccxml_dev/pygccxml/declarations/declaration.py =================================================================== --- pygccxml_dev/pygccxml/declarations/declaration.py 2009-01-05 21:03:16 UTC (rev 1535) +++ pygccxml_dev/pygccxml/declarations/declaration.py 2009-01-05 22:06:06 UTC (rev 1536) @@ -63,12 +63,14 @@ self._is_artificial = is_artificial self._mangled = mangled self._demangled = demangled - self._attributes = attributes + self._attributes = attributes self._parent = None self._cache = algorithms_cache.declaration_algs_cache_t() self._compiler = None self._partial_name = None - + self._decorated_name = None + self._undecorated_name = None + def __str__(self): """Default __str__ method. @@ -163,10 +165,10 @@ def _get_partial_name_impl( self ): return self.name - + @property def partial_name( self ): - """declaration name, without template default arguments + """declaration name, without template default arguments Right now std containers is the only classes that support this functionality""" if None is self._partial_name: self._partial_name = self._get_partial_name_impl() @@ -220,7 +222,7 @@ def _set_mangled( self, mangled ): self._mangled = mangled mangled = property( _get_mangled, _set_mangled - , doc="""Compiler generated declaration name + , doc="""GCCXML generated unique declaration name @type: str """ ) @@ -229,10 +231,28 @@ def _set_demangled( self, demangled ): self._demangled = demangled demangled = property( _get_demangled, _set_demangled - , doc="""Demangled compiler generated declaration name + , doc="""declaration name, reconstructed from GCCXML generated unique name @type: str """ ) + def _get_decorated_name( self ): + return self._decorated_name + def _set_decorated_name( self, decorated_name ): + self._decorated_name = decorated_name + decorated_name = property( _get_decorated_name, _set_decorated_name + , doc="""unique declaration name extracted from a binary file ( .map, .dll, .so, etc ) + @type: str + """ ) + + def _get_undecorated_name( self ): + return self._undecorated_name + def _set_undecorated_name( self, undecorated_name ): + self._undecorated_name = undecorated_name + undecorated_name = property( _get_undecorated_name, _set_undecorated_name + , doc="""declaration name, which was created by pygccxml, for matching ( source code <==> binary ) purpose + @type: str + """ ) + def _get_attributes( self ): return self._attributes def _set_attributes( self, attributes ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |