libabigail
|
Abstraction of a diff between two typedef_decl. More...
#include <abg-comparison.h>
Classes | |
struct | priv |
Public Member Functions | |
virtual void | chain_into_hierarchy () |
Populate the vector of children node of the diff base type sub-object of this instance of typedef_diff. | |
const typedef_decl_sptr | first_typedef_decl () const |
Getter for the firt typedef_decl involved in the diff. | |
virtual const string & | get_pretty_representation () const |
virtual bool | has_changes () const |
Return true iff the current diff node carries a change. | |
virtual enum change_kind | has_local_changes () const |
virtual void | report (ostream &, const string &indent="") const |
Reports the difference between the two subjects of the diff in a serialized form. | |
const typedef_decl_sptr | second_typedef_decl () const |
Getter for the second typedef_decl involved in the diff. | |
const diff_sptr | underlying_type_diff () const |
Getter for the diff between the two underlying types of the typedefs. | |
void | underlying_type_diff (const diff_sptr) |
Setter for the diff between the two underlying types of the typedefs. | |
Public Member Functions inherited from type_diff_base | |
Public Member Functions inherited from diff | |
diff_category | add_to_category (diff_category c) |
Adds the current diff tree node to an additional set of categories. Note that the categories include thoses inherited from the children nodes of this diff node. | |
void | add_to_local_and_inherited_categories (diff_category c) |
Adds the current diff tree node to the categories resulting from the local and inherited changes of the current diff node. | |
diff_category | add_to_local_category (diff_category c) |
Adds the current diff tree node to the categories resulting from the local changes of the current diff node. | |
void | append_child_node (diff_sptr) |
Add a new child node to the vector of children nodes for the current diff node. | |
const vector< diff * > & | children_nodes () const |
Getter for the children nodes of the current diff node. | |
const diff_context_sptr | context () const |
Getter of the context of the current diff. | |
void | context (diff_context_sptr c) |
Setter of the context of the current diff. | |
bool | currently_reporting () const |
Tests if we are currently in the middle of emitting a report for this diff. | |
void | currently_reporting (bool f) const |
Sets a flag saying if we are currently in the middle of emitting a report for this diff. | |
type_or_decl_base_sptr | first_subject () const |
Getter of the first subject of the diff. | |
diff * | get_canonical_diff () const |
Getter for the canonical diff of the current instance of diff. | |
diff_category | get_category () const |
Getter for the category of the current diff tree node. | |
diff_category | get_class_of_equiv_category () const |
Getter of the category of the class of equivalence of the current diff tree node. | |
diff_category | get_local_category () const |
Getter for the local category of the current diff tree node. | |
bool | has_descendant_allowed_by_specific_negated_suppression () const |
Test if the current diff node has a descendant node which is specifically allowed by a negated suppression specification. | |
bool | has_local_changes_to_be_reported () const |
Test if this diff tree node should be reported when considering the categories that were *NOT* inherited from its children nodes. | |
bool | has_parent_allowed_by_specific_negated_suppression () const |
Test if the current diff node has a parent node which is specifically allowed by a negated suppression specification. | |
bool | is_allowed_by_specific_negated_suppression () const |
Test if this diff node is allowed (prevented from being suppressed) by at least one negated suppression specification. | |
bool | is_filtered_out () const |
Test if this diff tree node is to be filtered out for reporting purposes. | |
bool | is_filtered_out_without_looking_at_allowed_changes () const |
Test if this diff tree node is to be filtered out for reporting purposes, but without considering the categories that can /force/ the node to be unfiltered. | |
bool | is_filtered_out_wrt_non_inherited_categories () const |
Test if this diff tree node is to be filtered out for reporting purposes, but by considering only the categories that were *NOT* inherited from its children nodes. | |
bool | is_suppressed () const |
Test if the current diff node has been suppressed by a user-provided suppression specification. | |
bool | is_suppressed (bool &is_private_type) const |
Test if the current diff node has been suppressed by a user-provided suppression specification or by an auto-generated "private type" suppression specification. | |
bool | is_traversing () const |
Tell if a given node is being traversed or not. | |
const diff * | parent_node () const |
Getter for the parent node of the current diff node. | |
diff_category | remove_from_category (diff_category c) |
Remove the current diff tree node from an a existing sef of categories. The categories include those inherited from the children nodes of the current diff node. | |
diff_category | remove_from_local_category (diff_category c) |
Remove the current diff tree node from the categories resulting from the local changes. | |
bool | reported_once () const |
Tests if a report has already been emitted for the current diff. | |
void | reported_once (bool f) const |
Sets a flag saying if a report has already been emitted for the current diff. | |
type_or_decl_base_sptr | second_subject () const |
Getter of the second subject of the diff. | |
void | set_category (diff_category c) |
Set the category of the current diff node. This category includes the categories inherited from the children nodes of the current diff node. | |
void | set_local_category (diff_category c) |
Set the local category of the current diff node. | |
bool | to_be_reported () const |
Test if this diff tree node should be reported. | |
virtual bool | traverse (diff_node_visitor &v) |
The generic traversing code that walks a given diff sub-tree. | |
Public Member Functions inherited from diff_traversable_base | |
Public Member Functions inherited from traversable_base | |
virtual | ~traversable_base () |
Destructor of the traversable_base type. | |
Protected Member Functions | |
typedef_diff (const typedef_decl_sptr first, const typedef_decl_sptr second, const diff_sptr underlying_type_diff, diff_context_sptr ctxt=diff_context_sptr()) | |
Constructor for typedef_diff. | |
Protected Member Functions inherited from type_diff_base | |
type_diff_base (type_base_sptr first_subject, type_base_sptr second_subject, diff_context_sptr ctxt) | |
Protected Member Functions inherited from diff | |
diff (type_or_decl_base_sptr first_subject, type_or_decl_base_sptr second_subject) | |
Constructor for the diff type. | |
diff (type_or_decl_base_sptr first_subject, type_or_decl_base_sptr second_subject, diff_context_sptr ctxt) | |
Constructor for the diff type. | |
void | begin_traversing () |
Flag a given diff node as being traversed. | |
bool | do_log () const |
Test if logging was requested. | |
void | do_log (bool) |
Request logging (or not) | |
void | end_traversing () |
Flag a given diff node as not being traversed anymore. | |
virtual void | finish_diff_type () |
Finish the insertion of a diff tree node into the diff graph. | |
void | set_canonical_diff (diff *) |
Setter for the canonical diff of the current instance of diff. | |
Protected Member Functions inherited from traversable_base | |
traversable_base () | |
Default constructor of the traversable_base type. | |
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. | |
void | visiting (bool f) |
The traversing code should be responsible of calling this, not the user code. | |
Friends | |
typedef_diff_sptr | compute_diff (const typedef_decl_sptr first, const typedef_decl_sptr second, diff_context_sptr ctxt) |
Compute a diff between two typedef_decl. | |
Additional Inherited Members | |
Protected Attributes inherited from diff | |
std::unique_ptr< priv > | priv_ |
Abstraction of a diff between two typedef_decl.
Definition at line 2378 of file abg-comparison.h.
|
protected |
Constructor for typedef_diff.
first | the first subject of the diff. |
second | the second subject of the diff. |
underlying | the underlying diff of the typedef_diff. That is the diff between the underlying types of first and second . |
ctxt | the context of the diff. Note that this context object must stay alive at least during the life time of the current instance of typedef_diff. Otherwise memory corruption issues occur. |
Definition at line 8096 of file abg-comparison.cc.
|
virtual |
Populate the vector of children node of the diff base type sub-object of this instance of typedef_diff.
The children node can then later be retrieved using diff::children_node().
Reimplemented from diff.
Definition at line 8079 of file abg-comparison.cc.
const typedef_decl_sptr first_typedef_decl | ( | ) | const |
Getter for the firt typedef_decl involved in the diff.
Definition at line 8108 of file abg-comparison.cc.
|
virtual |
Reimplemented from diff.
Definition at line 8139 of file abg-comparison.cc.
|
virtual |
Return true iff the current diff node carries a change.
Implements diff.
Definition at line 8158 of file abg-comparison.cc.
|
virtual |
Implements type_diff_base.
Definition at line 8168 of file abg-comparison.cc.
|
virtual |
Reports the difference between the two subjects of the diff in a serialized form.
out | the output stream to emit the report to. |
indent | the indentation string to use. |
Implements diff.
Definition at line 8183 of file abg-comparison.cc.
const typedef_decl_sptr second_typedef_decl | ( | ) | const |
Getter for the second typedef_decl involved in the diff.
Definition at line 8115 of file abg-comparison.cc.
const diff_sptr underlying_type_diff | ( | ) | const |
Getter for the diff between the two underlying types of the typedefs.
Definition at line 8124 of file abg-comparison.cc.
void underlying_type_diff | ( | const diff_sptr | d | ) |
Setter for the diff between the two underlying types of the typedefs.
d | the new diff object reprensenting the difference between the two underlying types of the typedefs. |
Definition at line 8133 of file abg-comparison.cc.
|
friend |
Compute a diff between two typedef_decl.
Note that the two types must have been created in the same environment, otherwise, this function aborts.
first | a pointer to the first typedef_decl to consider. |
second | a pointer to the second typedef_decl to consider. |
ctxt | the diff context to use. |
Definition at line 8201 of file abg-comparison.cc.