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
-
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_fun
(name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None)¶ Deprecated method. Use the free_function() method instead.
Deprecated since v1.9.0. Will be removed in v2.0.0
-
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_funs
(name=None, function=None, return_type=None, arg_types=None, header_dir=None, header_file=None, recursive=None, allow_empty=None)¶ Deprecated method. Use the free_functions() method instead.
Deprecated since v1.9.0. Will be removed in v2.0.0
-
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.
-
nss
(name=None, function=None, recursive=None, allow_empty=None)¶ Deprecated method. Use the namespaces() method instead.
Deprecated since v1.9.0. Will be removed in v2.0.0
-
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
-