Classes Summary:
Class for top-level Abstract Syntax Tree.
Base class for all declarations.
Mixin class for Decls which have a Repository Id
Functions:
identifier() -- name of the declaration as a string
scopedName() -- list of strings forming the fully-scoped name of the
declaration.
Module declaration (Decl, DeclRepoId)
Functions:
definitions() -- list of Decl objects declared within this module.
Interface declaration (Decl, DeclRepoId)
Functions:
abstract() -- boolean: true if the interface is declared abstract.
Forward-declared interface (Decl, DeclRepoId)
Functions:
abstract() -- boolean: true if the interface is declared abstract.
Constant declaration (Decl, DeclRepoId)
Functions:
constType() -- IdlType.Type object of this constant.
Declarator used in typedefs, struct members, etc.
Typedef (Decl)
Functions:
aliasType() -- IdlType.Type object that this is an alias to.
Member of a struct or exception (Decl)
Functions:
memberType() -- IdlType.Type object for the type of this member.
Struct declaration (Decl, DeclRepoId)
Functions:
members() -- list of Member objects for the struct contents.
Struct forward declaration (Decl, DeclRepoId)
Functions:
fullDecl() -- full definition of the struct.
Exception declaration (Decl, DeclRepoId)
Function:
members() -- list of Member objects for the exception contents.
Case label within a union (Decl)
Functions:
default() -- boolean: true if this is the default label.
One case within a union (Decl)
Functions:
labels() -- list of CaseLabel objects.
Union declaration (Decl, DeclRepoId)
Functions:
switchType() -- IdlType.Type object corresponding to the switch type.
Union forward declaration (Decl, DeclRepoId)
Functions:
fullDecl() -- full definition of the union.
Enumerator of an Enum (Decl, DeclRepoId)
Function:
value() -- integer value of enumerator, as marshalled.
Enum declaration (Decl, DeclRepoId)
Function:
enumerators() -- list of Enumerator objects.
Attribute declaration (Decl)
Functions:
readonly() -- boolean: true if the attribute is read only.
A Parameter of an operation or factory specifier (Decl)
Functions:
direction() -- integer: 0 == in, 1 == out, 2 == inout.
Operation declaration (Decl, DeclRepoId)
Functions:
oneway() -- boolean: true if operation is one way.
Native declaration (Decl, DeclRepoId)
Native should not be used in normal IDL.
State member of a valuetype (Decl)
Functions:
memberAccess() -- integer: 0 == public, 1 == private.
Factory method of valuetype (Decl)
Functions:
identifier() -- string.
Forward declared valuetype (Decl, DeclRepoId)
Function:
abstract() -- boolean: true if declared abstract.
ValueBox declaration (Decl, DeclRepoId)
Functions:
boxedType() -- IdlType.Type object for boxed type.
Abstract valuetype declaration (Decl, DeclRepoId)
Functions:
inherits() -- list of ValueAbs objects from which this inherits.
valuetype declaration (Decl, DeclRepoId)
Functions:
custom() -- boolean: true if declared custom.
Exception to indicate that findDecl() could not find the
requested Decl object.
Classes Details:
Class for top-level Abstract Syntax Tree.
Functions:
file() -- the file name of the main IDL file.
declarations() -- list of Decl objects corresponding to declarations
at file scope.
pragmas() -- list of Pragma objects containing #pragmas which
occurred before any declarations. Later #pragmas
are attached to Decl objects.
comments() -- list of Comment objects containing comments which
occurred before any declarations.
accept(visitor) -- visitor pattern accept. See idlvisitor.py.
Base class for all declarations.
Functions:
file() -- the IDL file this declaration came from.
line() -- the line number within the file.
mainFile() -- boolean: true if the file was the main IDL file;
false if it was an included file.
pragmas() -- list of Pragma objects containing #pragmas which
immediately followed this declaration.
comments() -- list of Comment objects containing comments which
immediately followed this declaration.
fullDecl() -- the 'full' Decl for typedefs, forwards, etc.
accept(visitor) -- visitor pattern accept. See idlvisitor.py.
Mixin class for Decls which have a Repository Id
Functions:
identifier() -- name of the declaration as a string
scopedName() -- list of strings forming the fully-scoped name of the
declaration. e.g. ::foo::bar::baz is represented as
['foo', 'bar', 'baz'].
repoId() -- repository identifier for this declaration.
Class containing information about an unknown pragma
Functions:
text() -- text of the pragma
__str__() -- same as text()
file() -- file containing the pragma
line() -- line number in file
Class containing information about a comment
Functions:
text() -- text of the comment
__str__() -- same as text()
file() -- file containing the comment
line() -- line number in file
Module declaration (Decl, DeclRepoId)
Functions:
definitions() -- list of Decl objects declared within this module.
continuations() -- list containing continuations of this module.
When modules are re-opened, multiple Module
objects with the same name appear in the
enclosing Module or AST object. In case it's
useful, the first Module object for a particular
module has a list containing continuations of
that module. You will probably not have any use
for this.
Interface declaration (Decl, DeclRepoId)
Functions:
abstract() -- boolean: true if the interface is declared abstract.
local() -- boolean: true if the interface is declared local.
inherits() -- list of Interface objects from which this one
inherits.
contents() -- list of Decl objects for all items declared within
this interface.
declarations() -- subset of contents() containing types, constants
and exceptions.
callables() -- subset of contents() containing Operations and
Attributes.
all_callables()-- callables of this and inherited interfaces.
Forward-declared interface (Decl, DeclRepoId)
Functions:
abstract() -- boolean: true if the interface is declared abstract.
local() -- boolean: true if the interface is declared local.
fullDecl() -- Interface object corresponding to full interface
declaration or None if there is no full declaration.
Constant declaration (Decl, DeclRepoId)
Functions:
constType() -- IdlType.Type object of this constant. Aliases not
stripped.
constKind() -- TypeCode kind of constant with aliases stripped.
value() -- value of the constant. Either an integer or an
Enumerator object.
Declarator used in typedefs, struct members, etc. (Decl, DeclRepoId)
Functions:
sizes() -- list of array sizes, or None if this is a simple
declarator.
alias() -- Typedef object for this declarator if this is a typedef
declarator. None otherwise.
Typedef (Decl)
Functions:
aliasType() -- IdlType.Type object that this is an alias to.
constrType() -- boolean: true if the alias type was constructed
within this typedef declaration.
declarators() -- list of Declarator objects.
Member of a struct or exception (Decl)
Functions:
memberType() -- IdlType.Type object for the type of this member.
constrType() -- boolean: true if the member type was constructed
within the member declaration.
declarators() -- list of Declarator objects.
Struct declaration (Decl, DeclRepoId)
Functions:
members() -- list of Member objects for the struct contents.
recursive() -- boolean: true if the struct is recursive.
Struct forward declaration (Decl, DeclRepoId)
Functions:
fullDecl() -- full definition of the struct.
Exception declaration (Decl, DeclRepoId)
Function:
members() -- list of Member objects for the exception contents.
Case label within a union (Decl)
Functions:
default() -- boolean: true if this is the default label.
value() -- label value. Either an integer or an Enumerator
object. If default() is true, returns a value used by
none of the other union labels.
labelKind() -- TypeCode kind of label.
One case within a union (Decl)
Functions:
labels() -- list of CaseLabel objects.
caseType() -- IdlType.Type object for the case type.
constrType() -- boolean: true if the case type was constructed
within the case.
declarator() -- Declarator object
Union declaration (Decl, DeclRepoId)
Functions:
switchType() -- IdlType.Type object corresponding to the switch type.
constrType() -- boolean: true if the switch type was declared within
the switch statement. Only possible for Enums.
cases() -- list of UnionCase objects.
recursive() -- boolean: true if the union is recursive.
Union forward declaration (Decl, DeclRepoId)
Functions:
fullDecl() -- full definition of the union.
Enumerator of an Enum (Decl, DeclRepoId)
Function:
value() -- integer value of enumerator, as marshalled.
Enum declaration (Decl, DeclRepoId)
Function:
enumerators() -- list of Enumerator objects.
Attribute declaration (Decl)
Functions:
readonly() -- boolean: true if the attribute is read only.
attrType() -- IdlType.Type object for the attribute's type.
declarators() -- list of the attribute's declarators.
identifiers() -- list of strings containing the attribute identifiers
(equivalent to the identifiers inside the declarators).
A Parameter of an operation or factory specifier (Decl)
Functions:
direction() -- integer: 0 == in, 1 == out, 2 == inout.
is_in() -- boolean: true if in or inout.
is_out() -- boolean: true if out or inout.
paramType() -- IdlType.Type object for the parameter type.
identifier() -- string of parameter identifier.
Operation declaration (Decl, DeclRepoId)
Functions:
oneway() -- boolean: true if operation is one way.
returnType() -- IdlType.Type object for return type.
parameters() -- list of Parameter objects.
raises() -- list of Exception objects.
contexts() -- list of strings for context expressions.
Native declaration (Decl, DeclRepoId)
Native should not be used in normal IDL.
No non-inherited functions.
State member of a valuetype (Decl)
Functions:
memberAccess() -- integer: 0 == public, 1 == private.
memberType() -- IdlType.Type object for member type.
constrType() -- boolean: true if member type is declared within
the StateMember.
declarators() -- list of Declarator objects.
Factory method of valuetype (Decl)
Functions:
identifier() -- string.
parameters() -- list of Parameter objects.
raises() -- list of Exception objects.
Forward declared valuetype (Decl, DeclRepoId)
Function:
abstract() -- boolean: true if declared abstract.
fullDecl() -- Value or ValueAbs object corresponding to the full
valuetype declaration or None if there is no full
declaration.
ValueBox declaration (Decl, DeclRepoId)
Functions:
boxedType() -- IdlType.Type object for boxed type.
constrType() -- boolean: true if boxed type is declared inside the
ValueBox declaration.
Abstract valuetype declaration (Decl, DeclRepoId)
Functions:
inherits() -- list of ValueAbs objects from which this inherits.
supports() -- list of Interface objects which this supports.
contents() -- list of Decl objects for declarations within this
valuetype.
declarations() -- subset of contents() containing types, constants
and exceptions.
callables() -- subset of contents() containing Operations and
Attributes.
statemembers() -- subset of contents() containing StateMembers.
factories() -- subset of contents() containing Factory instances.
valuetype declaration (Decl, DeclRepoId)
Functions:
custom() -- boolean: true if declared custom.
inherits() -- list of valuetypes from which this inherits. The
first may be a Value object or a ValueAbs object;
any others will be ValueAbs objects.
truncatable() -- boolean: true if the inherited Value is declared
truncatable.
supports() -- list of Interface objects which this supports.
contents() -- list of Decl objects for all items declared within
this valuetype.
declarations() -- subset of contents() containing types, constants
and exceptions.
callables() -- subset of contents() containing Operations and
Attributes.
statemembers() -- subset of contents() containing StateMembers.
factories() -- subset of contents() containing Factory instances.
Exception to indicate that findDecl() could not find the
requested Decl object.