6.5.1.1. Nodes (Entities)¶
Node Types¶
Routines¶
A
Routine represents functions, subprograms, methods,
member functions, and similar callable entities of the language.
The concrete kind of callable entity is specified by subtypes of Routine
(e.g.,
Method) and by attribute values (e.g.,
Element.Is_Static).
Types¶
A
Type represents types, structs, classes, records, unions,
type synonyms, interfaces, and similar entities of the type systems of various
languages.
The concrete kind of type is specified by subtypes of Type (e.g.,
Class) and by attribute values (e.g.,
Element.Is_Enum).
Note
Basic types like int or float in C/C++ are not represented.
Typically, such types are used frequently and convey little useful analysis
information. However, it is recorded if a programmer uses typedef in C/C++ to
create an alias type.
Members¶
A
Member represents fields, data members, record items, and
similar entities. A
Member is part of the entity that
encloses it (via an
Enclosing edge), which is usually a
type, but could also be, for example, a class template or, in Rust, an enum variant.
Note
Members do not represent entities that are callable. We use
methods for those entities.
Objects¶
An
Object represents variables and constant-like entities of
various languages.
Caution
Objects do not represent runtime objects. They are not directly related to object- oriented programming.
Templates¶
A
Template represents uninstantiated template and generic
entities, e.g., a generic class, package, or method.
Depending on the options used for translation, the instances are represented by nodes of
the respective instance types. These nodes are marked by
Element.Is_Template_Instance.