libabigail
|
The base class of both types and declarations. More...
#include <abg-ir.h>
Public Member Functions | |
type_or_decl_base (const environment &, enum type_or_decl_kind k=ABSTRACT_TYPE_OR_DECL) | |
Constructor of type_or_decl_base. More... | |
virtual | ~type_or_decl_base () |
The destructor of the type_or_decl_base type. More... | |
location & | get_artificial_location () const |
Getter of the artificial location of the artifact. More... | |
corpus * | get_corpus () |
Get the corpus this ABI artifact belongs to. More... | |
const corpus * | get_corpus () const |
Get the corpus this ABI artifact belongs to. More... | |
const environment & | get_environment () const |
Getter of the environment of the current ABI artifact. More... | |
bool | get_is_artificial () const |
Getter of the flag that says if the artefact is artificial. More... | |
virtual string | get_pretty_representation (bool internal=false, bool qualified_name=true) const =0 |
translation_unit * | get_translation_unit () |
Get the translation_unit this ABI artifact belongs to. More... | |
const translation_unit * | get_translation_unit () const |
Get the translation_unit this ABI artifact belongs to. More... | |
bool | has_artificial_location () const |
Test if the current ABI artifact carries an artificial location. More... | |
void | set_artificial_location (const location &) |
Setter of the artificial location of the artificat. More... | |
void | set_is_artificial (bool) |
Setter of the flag that says if the artefact is artificial. More... | |
void | set_translation_unit (translation_unit *) |
Set the translation_unit this ABI artifact belongs to. More... | |
virtual bool | traverse (ir_node_visitor &) |
Traverse the the ABI artifact. More... | |
Public Member Functions inherited from traversable_base | |
virtual | ~traversable_base () |
Destructor of the traversable_base type. More... | |
Protected Types | |
enum | type_or_decl_kind { ABSTRACT_TYPE_OR_DECL , ABSTRACT_DECL_BASE , ABSTRACT_SCOPE_DECL , GLOBAL_SCOPE_DECL , NAMESPACE_DECL , VAR_DECL , FUNCTION_DECL , FUNCTION_PARAMETER_DECL , METHOD_DECL , TEMPLATE_DECL , ABSTRACT_TYPE_BASE , ABSTRACT_SCOPE_TYPE_DECL , BASIC_TYPE , SUBRANGE_TYPE , QUALIFIED_TYPE , POINTER_TYPE , REFERENCE_TYPE , POINTER_TO_MEMBER_TYPE , ARRAY_TYPE , ENUM_TYPE , TYPEDEF_TYPE , CLASS_TYPE , UNION_TYPE , FUNCTION_TYPE , METHOD_TYPE } |
This is a bitmap type which instance is meant to contain the runtime type of a given ABI artifact. Bits of the identifiers of the type of a given artifact as well as the types it inherits from are to be set to 1. More... | |
Protected Member Functions | |
bool | hashing_started () const |
Getter for the 'hashing_started' property. More... | |
void | hashing_started (bool) const |
Setter for the 'hashing_started' property. More... | |
enum type_or_decl_kind | kind () const |
Getter for the "kind" property of type_or_decl_base type. More... | |
void | kind (enum type_or_decl_kind) |
Setter for the "kind" property of type_or_decl_base type. More... | |
type_or_decl_base & | operator= (const type_or_decl_base &) |
void * | runtime_type_instance () |
Getter of the pointer to the runtime type sub-object of the current instance. More... | |
const void * | runtime_type_instance () const |
Getter of the pointer to the runtime type sub-object of the current instance. More... | |
void | runtime_type_instance (void *) |
Setter of the pointer to the runtime type sub-object of the current instance. More... | |
void * | type_or_decl_base_pointer () |
Getter of the pointer to either the type_base sub-object of the current instance if it's a type, or to the decl_base sub-object of the current instance if it's a decl. More... | |
const void * | type_or_decl_base_pointer () const |
Getter of the pointer to either the type_base sub-object of the current instance if it's a type, or to the decl_base sub-object of the current instance if it's a decl. More... | |
Protected Member Functions inherited from traversable_base | |
traversable_base () | |
Default constructor of the traversable_base type. More... | |
bool | visiting () const |
This should returns false before and after the node has been visiting. During the visiting of the node (and of its children) this should return true. More... | |
void | visiting (bool f) |
The traversing code should be responsible of calling this, not the user code. More... | |
|
protected |
type_or_decl_base | ( | const environment & | e, |
enum type_or_decl_kind | k = ABSTRACT_TYPE_OR_DECL |
||
) |
Constructor of type_or_decl_base.
the | environment the current ABI artifact is constructed from. |
k | the runtime identifier bitmap of the type being built. |
|
virtual |
The destructor of the type_or_decl_base type.
location & get_artificial_location | ( | ) | const |
Getter of the artificial location of the artifact.
The artificial location is a location that was artificially generated by libabigail, not generated by the original emitter of the ABI meta-data. For instance, when reading an XML element from an abixml file, the artificial location is the source location of the XML element within the file, not the value of the 'location'property that might be carried by the element.
Artificial locations might be useful to ensure that the abixml emitted by the abixml writer is sorted the same way as the input abixml read by the reader.
corpus * get_corpus | ( | ) |
const corpus * get_corpus | ( | ) | const |
const environment & get_environment | ( | ) | const |
bool get_is_artificial | ( | ) | const |
translation_unit * get_translation_unit | ( | ) |
Get the translation_unit this ABI artifact belongs to.
const translation_unit * get_translation_unit | ( | ) | const |
Get the translation_unit this ABI artifact belongs to.
bool has_artificial_location | ( | ) | const |
|
protected |
|
protected |
|
protected |
Getter for the "kind" property of type_or_decl_base type.
This property holds the identifier bitmap of the runtime type of an ABI artifact.
|
protected |
Setter for the "kind" property of type_or_decl_base type.
This property holds the identifier bitmap of the runtime type of an ABI artifact.
the | runtime type identifier bitmap of the current ABI artifact. |
|
protected |
|
protected |
|
protected |
void set_artificial_location | ( | const location & | l | ) |
Setter of the artificial location of the artificat.
The artificial location is a location that was artificially generated by libabigail, not generated by the original emitter of the ABI meta-data. For instance, when reading an XML element from an abixml file, the artificial location is the source location of the XML element within the file, not the value of the 'location'property that might be carried by the element.
Artificial locations might be useful to ensure that abixml emitted by the abixml writer are sorted the same way as the input abixml read by the reader.
l | the new artificial location. |
void set_is_artificial | ( | bool | f | ) |
Setter of the flag that says if the artefact is artificial.
Being artificial means the artefact was not explicitely mentionned in the source code, but was rather artificially created by the compiler or by libabigail.
f | the new value of the flag that says if the artefact is artificial. |
void set_translation_unit | ( | translation_unit * | tu | ) |
Set the translation_unit this ABI artifact belongs to.
Note that adding an ABI artifact to a containining on should invoke this member function.
|
virtual |
Traverse the the ABI artifact.
v | the visitor used to traverse the sub-tree nodes of the artifact. |
Reimplemented from ir_traversable_base.
Reimplemented in member_class_template, union_decl, class_decl, class_or_union, class_tdecl, function_tdecl, function_decl::parameter, var_decl, enum_type_decl, array_type_def, ptr_to_mbr_type, reference_type_def, pointer_type_def, qualified_type_def, decl_base, member_function_template, class_decl::base_spec, function_type, function_decl, typedef_decl, array_type_def::subrange_type, namespace_decl, scope_type_decl, type_decl, type_base, and scope_decl.
|
protected |
Getter of the pointer to either the type_base sub-object of the current instance if it's a type, or to the decl_base sub-object of the current instance if it's a decl.
|
protected |
Getter of the pointer to either the type_base sub-object of the current instance if it's a type, or to the decl_base sub-object of the current instance if it's a decl.
|
friend |
Test whether a type is a class.
@parm t the type to consider.
t
is a class_decl or null otherwise.
|
friend |
|
friend |
|
friend |
bitwise "AND" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
|
friend |
bitwise "A&=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
|
friend |
bitwise "OR" operator for the type_or_decl_base::type_or_decl_kind bitmap type.
|
friend |
bitwise "|=" operator for the type_or_decl_base::type_or_decl_kind bitmap type.