Package pygccxml

# Source Code for Package pygccxml

     1  # Copyright 2004-2008 Roman Yakovenko.
     2  # Distributed under the Boost Software License, Version 1.0. (See
     3  # accompanying file LICENSE_1_0.txt or copy at
     4  # http://www.boost.org/LICENSE_1_0.txt)
     5
     6  """Python GCC-XML front end.
     7
     8  This package provides functionality to extract and inspect
     9  declarations from C/C++ header files. This is accomplished
    10  by invoking the external tool U{gccxml<http://www.gccxml.org/>}
    11  which parses a header file and dumps the declarations as a
    12  XML file. This XML file is then read by pygccxml and the contents
    13  are made available as appropriate Python objects.
    14
    15  To parse a set of C/C++ header files you use the
    16  L{parse()<parser.parse>} function in the L{parser} sub package which
    17  returns a tree that contains all declarations found in the header
    18  files. The root of the tree represents the main namespace C{::} and
    19  the children nodes represent the namespace contents such as other
    20  namespaces, classes, functions, etc. Each node in the tree is an
    21  object of a type derived from the
    22  L{declaration_t<declarations.declaration_t>} base class. An inner
    23  node is always either a namespace (L{namespace_t<declarations.namespace_t>})
    24  or a class (L{class_t<declarations.class_t>}) which are both derived
    25  from L{scopedef_t<declarations.scopedef_t>}. Everything else (free functions,
    26  member functions, enumerations, variables, etc.) is always a leaf.
    27  You will find all those declaration classes in the L{declarations}
    28  sub-package.
    29
    30  """
    31
    32  import pygccxml.declarations as declarations
    33  import pygccxml.parser as parser
    34  import pygccxml.utils as utils
    35
    36  #TODO:
    37  #  1. Write documentation for filtering functionality.
    38  #  2. Add "explicit" property for constructors
    39
    40  __version__ = '1.0.0'
    41
    42  __revision__ = 1080
    43