Update of /cvsroot/pygccxml/source/pygccxml/declarations
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23434
Modified Files:
class_declaration.py cpptypes.py declaration.py filters.py
scopedef.py
Log Message:
Cleaned up the doc strings to that epydoc doesn't generate any warnings/errors anymore. I also added a few bits and pieces.
Index: class_declaration.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/class_declaration.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** class_declaration.py 20 Dec 2005 08:55:00 -0000 1.18
--- class_declaration.py 8 Mar 2006 08:46:09 -0000 1.19
***************
*** 208,212 ****
@param access: describes desired members
! @type access: L<ACCESS_TYPES>
@return: [ members ]
--- 208,212 ----
@param access: describes desired members
! @type access: L{ACCESS_TYPES}
@return: [ members ]
***************
*** 230,234 ****
@param access: describes desired members
! @type access: L<ACCESS_TYPES>
@param new_members: list of new members
--- 230,234 ----
@param access: describes desired members
! @type access: L{ACCESS_TYPES}
@param new_members: list of new members
Index: cpptypes.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/cpptypes.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** cpptypes.py 14 Feb 2006 08:28:15 -0000 1.23
--- cpptypes.py 8 Mar 2006 08:46:10 -0000 1.24
***************
*** 302,306 ****
@param return_type: function return type
! @type: L{type_t}
@param arguments_types: list of argument L{type<type_t>}
--- 302,306 ----
@param return_type: function return type
! @type return_type: L{type_t}
@param arguments_types: list of argument L{type<type_t>}
Index: declaration.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/declaration.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** declaration.py 2 Mar 2006 05:55:39 -0000 1.18
--- declaration.py 8 Mar 2006 08:46:10 -0000 1.19
***************
*** 18,22 ****
class location_t(object):
! """provides information about declaration location within source file"""
def __init__(self, file_name='', line=-1 ):
--- 18,26 ----
class location_t(object):
! """Provides information about the location of the declaration within the source file.
!
! The header file name and the line number of the declaration can be
! accessed via the attributes C{file_name} and C{line}.
! """
def __init__(self, file_name='', line=-1 ):
***************
*** 43,47 ****
self._file_name = new_file_name
file_name = property( _get_file_name, _set_file_name
! , doc="path to file, in which declaration has been declarated")
def _get_line( self ):
--- 47,53 ----
self._file_name = new_file_name
file_name = property( _get_file_name, _set_file_name
! , doc="""The full file name of the header in which the declaration was found.
! @type: str
! """)
def _get_line( self ):
***************
*** 50,60 ****
self._line = new_line
line = property( _get_line, _set_line
! , doc="line number of declaration within file")
def as_tuple( self ):
return (self.file_name, self.line)
class declaration_t( object ):
! """base class for all classes, that describes a C++ declaration"""
def __init__( self, name='', parent=None, location=None, is_artificial=False, mangled=None ):
self._name = name
--- 56,73 ----
self._line = new_line
line = property( _get_line, _set_line
! , doc="""The line number where the declaration was found
! @type: int
! """)
def as_tuple( self ):
+ """Return the header file name and the line number.
+
+ @returns: Returns a 2-tuple (file name, line number).
+ """
return (self.file_name, self.line)
class declaration_t( object ):
! """Base class for all classes that represent a C++ declaration.
! """
def __init__( self, name='', parent=None, location=None, is_artificial=False, mangled=None ):
self._name = name
***************
*** 118,122 ****
self._name = new_name
name = property( _get_name, _set_name
! , doc="declaration name")
def _get_parent(self):
--- 131,137 ----
self._name = new_name
name = property( _get_name, _set_name
! , doc="""Declaration name
! @type: str
! """)
def _get_parent(self):
***************
*** 127,131 ****
self._parent = new_parent
parent = property( _get_parent, _set_parent
! , doc="reference to parent declaration")
def __get_top_parent(self):
--- 142,148 ----
self._parent = new_parent
parent = property( _get_parent, _set_parent
! , doc="""Reference to parent declaration
! @type: declaration_t
! """)
def __get_top_parent(self):
***************
*** 138,142 ****
me = parent
parent = me.parent
! top_parent = property( __get_top_parent, doc="reference to top parent declaration" )
def _get_location( self ):
--- 155,162 ----
me = parent
parent = me.parent
! top_parent = property( __get_top_parent,
! doc="""reference to top parent declaration
! @type: declaration_t
! """ )
def _get_location( self ):
***************
*** 145,149 ****
self._location = new_location
location = property( _get_location, _set_location
! , doc="location of the declaration within source file")
def _get_is_artificial( self ):
--- 165,171 ----
self._location = new_location
location = property( _get_location, _set_location
! , doc="""Location of the declaration within source file
! @type: L{location_t}
! """)
def _get_is_artificial( self ):
***************
*** 152,156 ****
self._is_artificial = new_artificial
is_artificial = property( _get_is_artificial, _set_is_artificial
! , doc="describes whether declaration is compiler generated or not")
def _get_mangled( self ):
--- 174,180 ----
self._is_artificial = new_artificial
is_artificial = property( _get_is_artificial, _set_is_artificial
! , doc="""Describes whether declaration is compiler generated or not
! @type: bool
! """)
def _get_mangled( self ):
***************
*** 159,163 ****
self._mangled = mangled
mangled = property( _get_mangled, _set_mangled
! , doc="compiler generated declaration name" )
def _create_decl_string(self):
--- 183,189 ----
self._mangled = mangled
mangled = property( _get_mangled, _set_mangled
! , doc="""Compiler generated declaration name
! @type: str
! """ )
def _create_decl_string(self):
***************
*** 166,168 ****
def _decl_string(self):
return self._create_decl_string()
! decl_string = property( _decl_string, doc="full name of the declaration" )
--- 192,197 ----
def _decl_string(self):
return self._create_decl_string()
! decl_string = property( _decl_string,
! doc="""Full name of the declaration
! @type: str
! """ )
Index: filters.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/filters.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** filters.py 2 Mar 2006 05:53:14 -0000 1.1
--- filters.py 8 Mar 2006 08:46:10 -0000 1.2
***************
*** 95,107 ****
class calldef_matcher_t( declaration_matcher_t ):
def __init__( self, return_type=None, arg_types=None, *arguments, **keywords):
! """
! return_value_type could be string or instance of class derived from
! cpptypes.type_t
! arg_types could be a list of strings or cpptypes.type_t.
! It could be a mix. In this case you should specify all arguments.
! If you don't want to match some argument you can insert None
! instead.
! In future it should be possible to select function by it's
! default argument value and/or exception ....
"""
if not keywords.has_key( 'decl_type' ):
--- 95,108 ----
class calldef_matcher_t( declaration_matcher_t ):
def __init__( self, return_type=None, arg_types=None, *arguments, **keywords):
! """Constructor.
!
! return_value_type could be string or instance of class derived from
! cpptypes.type_t
! arg_types could be a list of strings or cpptypes.type_t.
! It could be a mix. In this case you should specify all arguments.
! If you don't want to match some argument you can insert None
! instead.
! In future it should be possible to select function by it's
! default argument value and/or exception ....
"""
if not keywords.has_key( 'decl_type' ):
***************
*** 157,159 ****
if not isinstance( decl.parent, class_declaration.class_t ):
return False
! return self.access_type == decl.parent.find_out_member_access_type( decl )
\ No newline at end of file
--- 158,160 ----
if not isinstance( decl.parent, class_declaration.class_t ):
return False
! return self.access_type == decl.parent.find_out_member_access_type( decl )
Index: scopedef.py
===================================================================
RCS file: /cvsroot/pygccxml/source/pygccxml/declarations/scopedef.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** scopedef.py 18 Dec 2005 12:11:13 -0000 1.8
--- scopedef.py 8 Mar 2006 08:46:10 -0000 1.9
***************
*** 11,16 ****
class scopedef_t( declaration.declaration_t ):
! """
! base class for L{namespace_t} and L{class_t} classes
"""
def __init__( self, name='', parent=''):
--- 11,19 ----
class scopedef_t( declaration.declaration_t ):
! """Base class for L{namespace_t} and L{class_t} classes.
!
! This is the base class for all declaration classes that may have
! children nodes. The children can be accessed via the C{declarations}
! property.
"""
def __init__( self, name='', parent=''):
***************
*** 36,40 ****
def _get_declarations(self):
return self._get_declarations_impl()
! declarations = property( _get_declarations )
def remove_declaration( self, decl ):
--- 39,46 ----
def _get_declarations(self):
return self._get_declarations_impl()
! declarations = property( _get_declarations,
! doc="""A list of children declarations.
! @type: list of L{declaration_t}
! """)
def remove_declaration( self, decl ):
|