[pygccxml-commit] source/pygccxml/declarations namespace.py,1.9,1.10
Brought to you by:
mbaas,
roman_yakovenko
From: Matthias B. <mb...@us...> - 2006-03-22 10:38:31
|
Update of /cvsroot/pygccxml/source/pygccxml/declarations In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv612 Modified Files: namespace.py Log Message: Added a specialized __str__ method Index: namespace.py =================================================================== RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/namespace.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** namespace.py 2 Mar 2006 05:55:39 -0000 1.9 --- namespace.py 22 Mar 2006 10:38:29 -0000 1.10 *************** *** 9,12 **** --- 9,13 ---- import declaration import scopedef + import algorithm class namespace_t( scopedef.scopedef_t ): *************** *** 21,24 **** --- 22,31 ---- self._declarations = declarations # list of all declarations belongs to this namespace + def __str__(self): + name = algorithm.full_name(self) + if name!="::" and name[:2]=="::": + name = name[2:] + return "%s [namespace]"%name + def _get__cmp__scope_items(self): return [ self._sorted_list( self.declarations ) ] *************** *** 49,51 **** #add more comment about this. #if not keep_parent: ! # decl.parent=None \ No newline at end of file --- 56,58 ---- #add more comment about this. #if not keep_parent: ! # decl.parent=None |