Revision: 425
Author: roman_yakovenko
Date: 2006-08-20 12:15:31 -0700 (Sun, 20 Aug 2006)
ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=425&view=rev
Log Message:
-----------
fixing interface bug: parent should be managed by
scopedef_t objects only
Modified Paths:
--------------
pygccxml_dev/pygccxml/declarations/calldef.py
pygccxml_dev/pygccxml/declarations/class_declaration.py
pygccxml_dev/pygccxml/declarations/declaration.py
pygccxml_dev/pygccxml/declarations/enumeration.py
pygccxml_dev/pygccxml/declarations/namespace.py
pygccxml_dev/pygccxml/declarations/scopedef.py
pygccxml_dev/pygccxml/declarations/typedef.py
pygccxml_dev/pygccxml/declarations/variable.py
Modified: pygccxml_dev/pygccxml/declarations/calldef.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/calldef.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/calldef.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -95,12 +95,11 @@
"""base class for all "callable" declarations"""
def __init__( self
, name=''
- , parent=None
, arguments=None
, exceptions=None
, return_type=None
, has_extern=False ):
- declaration.declaration_t.__init__( self, name, parent )
+ declaration.declaration_t.__init__( self, name )
if not arguments:
arguments = []
self._arguments = arguments
Modified: pygccxml_dev/pygccxml/declarations/class_declaration.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/class_declaration.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/class_declaration.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -77,8 +77,8 @@
class class_declaration_t( declaration.declaration_t ):
"""describes class declaration"""
- def __init__( self, name='', parent='' ):
- declaration.declaration_t.__init__( self, name, parent )
+ def __init__( self, name='' ):
+ declaration.declaration_t.__init__( self, name )
def _get__cmp__items(self):
return []
@@ -87,8 +87,8 @@
"""describes class definition"""
USE_DEMANGLED_AS_NAME = True
- def __init__( self, name='', parent=None, class_type=CLASS_TYPES.CLASS, is_abstract=False ):
- scopedef.scopedef_t.__init__( self, name, parent )
+ def __init__( self, name='', class_type=CLASS_TYPES.CLASS, is_abstract=False ):
+ scopedef.scopedef_t.__init__( self, name )
if class_type:
assert( class_type in CLASS_TYPES.ALL )
self._class_type = class_type
Modified: pygccxml_dev/pygccxml/declarations/declaration.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/declaration.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/declaration.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -69,15 +69,13 @@
"""Base class for all classes that represent a C++ declaration.
"""
- def __init__( self, name='', parent=None, location=None, is_artificial=False, mangled=None, demangled=None ):
+ def __init__( self, name='', location=None, is_artificial=False, mangled=None, demangled=None ):
self._name = name
- if parent:
- assert( isinstance( parent, declaration_t ) )
- self._parent = parent
self._location = location
self._is_artificial = is_artificial
self._mangled = mangled
self._demangled = demangled
+ self._parent = None
def __str__(self):
"""Default __str__ method.
Modified: pygccxml_dev/pygccxml/declarations/enumeration.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/enumeration.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/enumeration.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -15,7 +15,7 @@
"""
describes C++ enum
"""
- def __init__( self, name='', parent=None, values=None ):
+ def __init__( self, name='', values=None ):
"""Constructor.
The items of the list 'values' may either be strings containing
@@ -28,7 +28,7 @@
@param values: Enumeration values
@type values: list
"""
- declaration.declaration_t.__init__( self, name, parent )
+ declaration.declaration_t.__init__( self, name )
# A list of tuples (valname(str), valnum(int)). The order of the list should
# be the same as the order in the C/C++ source file.
Modified: pygccxml_dev/pygccxml/declarations/namespace.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/namespace.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/namespace.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -15,8 +15,8 @@
describes C++ namespace
"""
- def __init__( self, name='', parent=None, declarations=None ):
- scopedef.scopedef_t.__init__( self, name, parent )
+ def __init__( self, name='', declarations=None ):
+ scopedef.scopedef_t.__init__( self, name )
if not declarations:
declarations = []
self._declarations = declarations # list of all declarations belongs to this namespace
Modified: pygccxml_dev/pygccxml/declarations/scopedef.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/scopedef.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/scopedef.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -66,8 +66,8 @@
_impl_decl_types = {} #this class variable is used to prevent recursive imports
_impl_all_decl_types = [] #this class variable is used to prevent recursive imports
- def __init__( self, name='', parent=''):
- declaration.declaration_t.__init__( self, name, parent )
+ def __init__( self, name=''):
+ declaration.declaration_t.__init__( self, name )
self._optimized = False
self._type2decls = {}
Modified: pygccxml_dev/pygccxml/declarations/typedef.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/typedef.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/typedef.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -12,8 +12,8 @@
class typedef_t( declaration.declaration_t ):
"""describes C++ typedef declaration"""
- def __init__( self, name='', parent=None, type=None ):
- declaration.declaration_t.__init__( self, name, parent )
+ def __init__( self, name='', type=None ):
+ declaration.declaration_t.__init__( self, name )
self._type = type
def _get__cmp__items( self ):
Modified: pygccxml_dev/pygccxml/declarations/variable.py
===================================================================
--- pygccxml_dev/pygccxml/declarations/variable.py 2006-08-20 14:16:39 UTC (rev 424)
+++ pygccxml_dev/pygccxml/declarations/variable.py 2006-08-20 19:15:31 UTC (rev 425)
@@ -12,9 +12,9 @@
class variable_t( declaration.declaration_t ):
"""describes C++ global and member variable declaration"""
- def __init__( self, name='', parent=None, type=None, type_qualifiers=None, value=None, bits=None):
- """@undocumented:"""
- declaration.declaration_t.__init__( self, name, parent )
+ def __init__( self, name='', type=None, type_qualifiers=None, value=None, bits=None):
+ """@undocumented __init__:"""
+ declaration.declaration_t.__init__( self, name )
self._type = type
self._type_qualifiers = type_qualifiers
self._value = value
@@ -59,4 +59,4 @@
def _set_bits(self, bits):
self._bits = bits
bits = property( _get_bits, _set_bits
- , doc="int, that contains information how many bit takes bit field")
+ , doc="integer, that contains information about how many bit takes bit field")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|