# pygccxml.declarations.declaration module

Defines `pygccxml.declarations.declaration_t` class - all declarations base class.

class declaration_t(name='', location=None, is_artificial=False, mangled=None, attributes=None)

  Bases: `object`

  Base class for all classes that represent a C++ declaration.

  property attributes

    GCCXML attributes, set using __attribute__((gccxml(”…”)))

    @type: str

  property cache

    Implementation detail.

    Reference to instance of `algorithms_cache_t` class.

  property comment
  create_decl_string(with_defaults=True)
  property decl_string

    Declaration full name.

  property deprecation
  get_mangled_name()
  i_depend_on_them(recursive=True)

    Return list of all types and declarations the declaration depends on

  property is_artificial

    Describes whether declaration is compiler generated or not

    @type: bool

  property location

    Location of the declaration within source file

    @type: `location_t`

  property mangled

    Unique declaration name generated by the compiler.

    For GCCXML, you can get the mangled name for all the declarations. When using CastXML, calling mangled is only allowed on functions and variables. For other declarations it will raise an exception.

    Returns

      the mangled name

    Return type

      str

  property name

    Declaration name @type: str

  property parent

    Reference to parent declaration.

    @type: declaration_t

  property partial_decl_string

    Declaration full name.

  property partial_name

    Declaration name, without template default arguments.

    Right now std containers is the only classes that support this functionality.

  property top_parent

    Reference to top parent declaration.

    @type: declaration_t