libabigail
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
ptr_to_mbr_diff Class Reference

The abstraction of a diff between two ptr_to_mbr_type. More...

#include <abg-comparison.h>

Inheritance diagram for ptr_to_mbr_diff:
[legend]

Classes

struct  priv
 The private data of the ptr_to_mbr_diff type. More...
 

Public Member Functions

virtual ~ptr_to_mbr_diff ()
 Destructor of ptr_to_mbr_diff. More...
 
virtual void chain_into_hierarchy ()
 Populate the vector of children node of the diff base type sub-object of this instance of ptr_to_mbr_diff. More...
 
const diff_sptr containing_type_diff () const
 Getter of the diff node carrying changes to the containing type of first subject of the current diff node. More...
 
ptr_to_mbr_type_sptr first_ptr_to_mbr_type () const
 Getter of the first pointer-to-member subject of the current diff node. More...
 
virtual const string & get_pretty_representation () const
 Get the pretty representation of the current ptr_to_mbr_diff node. More...
 
virtual bool has_changes () const
 Test whether the current diff node carries any change. More...
 
virtual enum change_kind has_local_changes () const
 Test whether the current diff node carries any local change. More...
 
const diff_sptr member_type_diff () const
 Getter of the diff node carrying changes to the member type of first subject of the current diff node. More...
 
virtual void report (ostream &, const string &indent="") const
 Pure interface to report the diff in a serialized form that is legible for the user. More...
 
ptr_to_mbr_type_sptr second_ptr_to_mbr_type () const
 Getter of the second pointer-to-member subject of the current diff node. More...
 
- 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. More...
 
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. More...
 
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. More...
 
void append_child_node (diff_sptr)
 Add a new child node to the vector of children nodes for the current diff node. More...
 
const vector< diff * > & children_nodes () const
 Getter for the children nodes of the current diff node. More...
 
const diff_context_sptr context () const
 Getter of the context of the current diff. More...
 
void context (diff_context_sptr c)
 Setter of the context of the current diff. More...
 
bool currently_reporting () const
 Tests if we are currently in the middle of emitting a report for this diff. More...
 
void currently_reporting (bool f) const
 Sets a flag saying if we are currently in the middle of emitting a report for this diff. More...
 
type_or_decl_base_sptr first_subject () const
 Getter of the first subject of the diff. More...
 
diffget_canonical_diff () const
 Getter for the canonical diff of the current instance of diff. More...
 
diff_category get_category () const
 Getter for the category of the current diff tree node. More...
 
diff_category get_class_of_equiv_category () const
 Getter of the category of the class of equivalence of the current diff tree node. More...
 
diff_category get_local_category () const
 Getter for the local category of the current diff tree node. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool is_filtered_out () const
 Test if this diff tree node is to be filtered out for reporting purposes. More...
 
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. More...
 
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. More...
 
bool is_suppressed () const
 Test if the current diff node has been suppressed by a user-provided suppression specification. More...
 
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. More...
 
bool is_traversing () const
 Tell if a given node is being traversed or not. More...
 
const diffparent_node () const
 Getter for the parent node of the current diff node. More...
 
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. More...
 
diff_category remove_from_local_category (diff_category c)
 Remove the current diff tree node from the categories resulting from the local changes. More...
 
bool reported_once () const
 Tests if a report has already been emitted for the current diff. More...
 
void reported_once (bool f) const
 Sets a flag saying if a report has already been emitted for the current diff. More...
 
type_or_decl_base_sptr second_subject () const
 Getter of the second subject of the diff. More...
 
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. More...
 
void set_local_category (diff_category c)
 Set the local category of the current diff node. More...
 
bool to_be_reported () const
 Test if this diff tree node should be reported. More...
 
virtual bool traverse (diff_node_visitor &v)
 The generic traversing code that walks a given diff sub-tree. More...
 
- Public Member Functions inherited from traversable_base
virtual ~traversable_base ()
 Destructor of the traversable_base type. More...
 

Protected Member Functions

 ptr_to_mbr_diff (const ptr_to_mbr_type_sptr &first, const ptr_to_mbr_type_sptr &second, const diff_sptr &member_type_diff, const diff_sptr &containing_type_diff, diff_context_sptr ctxt)
 Constructor of ptr_to_mbr_diff. More...
 
- 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. More...
 
 diff (type_or_decl_base_sptr first_subject, type_or_decl_base_sptr second_subject, diff_context_sptr ctxt)
 Constructor for the diff type. More...
 
void begin_traversing ()
 Flag a given diff node as being traversed. More...
 
bool do_log () const
 Test if logging was requested. More...
 
void do_log (bool)
 Request logging (or not) More...
 
void end_traversing ()
 Flag a given diff node as not being traversed anymore. More...
 
virtual void finish_diff_type ()
 Finish the insertion of a diff tree node into the diff graph. More...
 
void set_canonical_diff (diff *)
 Setter for the canonical diff of the current instance of diff. 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...
 

Friends

ptr_to_mbr_diff_sptr compute_diff (const ptr_to_mbr_type_sptr &first, const ptr_to_mbr_type_sptr &second, diff_context_sptr &ctxt)
 Compute the diff between two ptr_to_mbr_type types. More...
 

Additional Inherited Members

- Protected Attributes inherited from diff
std::unique_ptr< priv > priv_
 

Detailed Description

The abstraction of a diff between two ptr_to_mbr_type.

Definition at line 1421 of file abg-comparison.h.

Constructor & Destructor Documentation

◆ ptr_to_mbr_diff()

ptr_to_mbr_diff ( const ptr_to_mbr_type_sptr first,
const ptr_to_mbr_type_sptr second,
const diff_sptr member_type_diff,
const diff_sptr containing_type_diff,
diff_context_sptr  ctxt 
)
protected

Constructor of ptr_to_mbr_diff.

Parameters
firstthe first pointer-to-member subject of the diff.
secondthe second pointer-to-member subject of the diff.
member_type_diffthe diff node carrying changes to the member type of the pointer-to-member we are considering.
containing_type_diffthe diff node carrying changes to the containing type of the pointer-to-member we are considering.
ctxtthe context of the diff we are considering.

Definition at line 4204 of file abg-comparison.cc.

◆ ~ptr_to_mbr_diff()

~ptr_to_mbr_diff ( )
virtual

Destructor of ptr_to_mbr_diff.

Definition at line 4309 of file abg-comparison.cc.

Member Function Documentation

◆ chain_into_hierarchy()

void chain_into_hierarchy ( )
virtual

Populate the vector of children node of the diff base type sub-object of this instance of ptr_to_mbr_diff.

The children node can then later be retrieved using diff::children_node().

Reimplemented from diff.

Definition at line 4302 of file abg-comparison.cc.

◆ containing_type_diff()

const diff_sptr containing_type_diff ( ) const

Getter of the diff node carrying changes to the containing type of first subject of the current diff node.

Returns
The diff node carrying changes to the containing type of first subject of the current diff node.

Definition at line 4246 of file abg-comparison.cc.

◆ first_ptr_to_mbr_type()

ptr_to_mbr_type_sptr first_ptr_to_mbr_type ( ) const

Getter of the first pointer-to-member subject of the current diff node.

Returns
the first pointer-to-member subject of the current diff node.

Definition at line 4219 of file abg-comparison.cc.

◆ get_pretty_representation()

const string & get_pretty_representation ( ) const
virtual

Get the pretty representation of the current ptr_to_mbr_diff node.

Returns
the pretty representation of the current diff node.

Reimplemented from diff.

Definition at line 4275 of file abg-comparison.cc.

◆ has_changes()

bool has_changes ( ) const
virtual

Test whether the current diff node carries any change.

Returns
true iff the current diff node carries any change.

Implements diff.

Definition at line 4253 of file abg-comparison.cc.

◆ has_local_changes()

enum change_kind has_local_changes ( ) const
virtual

Test whether the current diff node carries any local change.

Returns
true iff the current diff node carries any local change.

Implements type_diff_base.

Definition at line 4253 of file abg-comparison.cc.

◆ member_type_diff()

const diff_sptr member_type_diff ( ) const

Getter of the diff node carrying changes to the member type of first subject of the current diff node.

Returns
The diff node carrying changes to the member type of first subject of the current diff node.

Definition at line 4237 of file abg-comparison.cc.

◆ report()

void report ( ostream &  out,
const string &  indent = "" 
) const
virtual

Pure interface to report the diff in a serialized form that is legible for the user.

Note that the serializd report has to leave one empty line at the end of its content.

Parameters
outthe output stream to serialize the report to.
indentthe indentation string to use.

Implements diff.

Definition at line 4291 of file abg-comparison.cc.

◆ second_ptr_to_mbr_type()

ptr_to_mbr_type_sptr second_ptr_to_mbr_type ( ) const

Getter of the second pointer-to-member subject of the current diff node.

Returns
the second pointer-to-member subject of the current diff node.

Definition at line 4228 of file abg-comparison.cc.

Friends And Related Function Documentation

◆ compute_diff

ptr_to_mbr_diff_sptr compute_diff ( const ptr_to_mbr_type_sptr first,
const ptr_to_mbr_type_sptr second,
diff_context_sptr ctxt 
)
friend

Compute the diff between two ptr_to_mbr_type types.

Note that the two types must have been created in the same environment, otherwise, this function aborts.

Parameters
firstthe first pointer-to-member type to consider for the diff.
secondthe second pointer-to-member type to consider for the diff.
ctxtthe diff context to use.

Definition at line 4324 of file abg-comparison.cc.


The documentation for this class was generated from the following files: