# pygccxml.declarations.namespace module

Describe a C++ namespace declaration.

get_global_namespace(decls)

  Get the global namespace (::) from a declaration tree.

  Parameters

    decls (list[declaration_t]) – a list of declarations

  Returns

    the global namespace_t object (::)

  Return type

    namespace_t

class namespace_t(name='', declarations=None)

  Bases: `pygccxml.declarations.scopedef.scopedef_t`

  Describes C++ namespace.

  adopt_declaration(decl)
  property declarations

    List of children declarations.

    Returns

      list[declaration_t]

  free_function(name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None)

    Returns reference to free function declaration that matches a defined criteria.

  free_functions(name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None)

    Returns a set of free function declarations that match a defined criteria.

  free_operator(name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None)

    Returns reference to free operator declaration that matches a defined criteria.

  free_operators(name=None, function=None, symbol=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None)

    Returns a set of free operator declarations that match a defined criteria.

  i_depend_on_them(recursive=True)

    Return list of all types and declarations the declaration depends on

  namespace(name=None, function=None, recursive=None)

    Returns reference to namespace declaration that matches a defined criteria.

  namespaces(name=None, function=None, recursive=None, allow_empty=None)

    Returns a set of namespace declarations that match a defined criteria.

  remove_declaration(decl)

    Removes declaration from members list.

    Parameters

      decl (`declaration_t`) – declaration to be removed

  take_parenting(inst)

    Takes parenting from inst and transfers it to self.

    Parameters

      inst (namespace_t) – a namespace declaration