libabigail
Classes | Public Member Functions | Public Attributes | Friends | List of all members
suppression_base Class Referenceabstract

Base type of a direct suppression specifications types. More...

#include <abg-suppression.h>

Inheritance diagram for suppression_base:
[legend]

Classes

class  priv
 The private data of suppression_base. More...
 

Public Member Functions

 suppression_base (const string &label)
 Constructor for suppression_base. More...
 
 suppression_base (const string &label, const string &file_name_regex_str, const string &file_name_not_regex_str)
 Constructor for suppression_base. More...
 
bool get_drops_artifact_from_ir () const
 Tests if the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not. More...
 
const string & get_file_name_not_regex_str () const
 Getter for the "file_name_not_regex" property of the current instance of suppression_base. More...
 
const string & get_file_name_regex_str () const
 Getter for the "file_name_regex" property of the current instance of suppression_base. More...
 
bool get_is_artificial () const
 Test is the suppression specification is artificial. More...
 
const string get_label () const
 Getter for the label associated to this suppression specification. More...
 
const string & get_soname_not_regex_str () const
 Getter of the "soname_not_regex_str property of the current instance of suppression_base. More...
 
const string & get_soname_regex_str () const
 Getter of the "soname_regex_str property of the current instance of suppression_base. More...
 
bool has_file_name_related_property () const
 Test if the current suppression has a property related to file name. More...
 
bool has_soname_related_property () const
 Test if the current suppression has a property related to SONAMEs. More...
 
void set_drops_artifact_from_ir (bool)
 Set the flag that says whether the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not. More...
 
void set_file_name_not_regex_str (const string &regexp)
 Setter for the "file_name_not_regex" property of the current instance of suppression_base. More...
 
void set_file_name_regex_str (const string &regexp)
 Setter for the "file_name_regex" property of the current instance of suppression_base. More...
 
void set_is_artificial (bool)
 Set a flag saying if the suppression specification is artificial or not. More...
 
void set_label (const string &)
 Setter for the label associated to this suppression specification. More...
 
void set_soname_not_regex_str (const string &regexp)
 Setter of the "soname_not_regex_str property of the current instance of suppression_base. More...
 
void set_soname_regex_str (const string &regexp)
 Setter of the "soname_regex_str property of the current instance of suppression_base. More...
 
virtual bool suppresses_diff (const diff *) const =0
 

Public Attributes

std::unique_ptr< privpriv_
 

Friends

bool suppression_matches_soname (const string &soname, const suppression_base &suppr)
 Test if a given SONAME is matched by a given suppression specification. More...
 
bool suppression_matches_soname_or_filename (const string &soname, const string &filename, const suppression_base &suppr)
 Test if a given SONAME or file name is matched by a given suppression specification. More...
 

Detailed Description

Base type of a direct suppression specifications types.

This abstracts a suppression specification. It's a way to specify how to drop reports about a particular diff node on the floor, if it matches the supppression specification.

Note that a direct suppression specification suppresses (for reporting purposes) the diff node that it matches. A negated suppression specification, however, suppresses a diff node that it DOES NOT match. A Negated suppression specification is abstracted by the class negated_suppression_base.

Definition at line 50 of file abg-suppression.h.

Constructor & Destructor Documentation

◆ suppression_base() [1/2]

suppression_base ( const string &  label)

Constructor for suppression_base.

Parameters
alabel for the suppression. This represents just a comment.

Definition at line 92 of file abg-suppression.cc.

◆ suppression_base() [2/2]

suppression_base ( const string &  label,
const string &  file_name_regex_str,
const string &  file_name_not_regex_str 
)

Constructor for suppression_base.

Parameters
alabel for the suppression. This represents just a comment.
file_name_regex_strthe regular expression that denotes the file name to match.
file_name_not_regex_strthe regular expression that denotes the file name to *NOT* match.

Definition at line 106 of file abg-suppression.cc.

Member Function Documentation

◆ get_drops_artifact_from_ir()

bool get_drops_artifact_from_ir ( ) const

Tests if the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not.

Returns
true iff the current suppression specification is to avoid adding the matched ABI artifact to the internal representation.

Definition at line 121 of file abg-suppression.cc.

◆ get_file_name_not_regex_str()

const string & get_file_name_not_regex_str ( ) const

Getter for the "file_name_not_regex" property of the current instance of suppression_base.

The current suppression specification should apply to ABI artifacts of a file which name does *NOT* match the regular expression string designated by the "file_name_not_regex" property.

Returns
the regular expression string.

Definition at line 217 of file abg-suppression.cc.

◆ get_file_name_regex_str()

const string & get_file_name_regex_str ( ) const

Getter for the "file_name_regex" property of the current instance of suppression_base.

The "file_name_regex" property is a regular expression string that designates the file name that contains the ABI artifacts this suppression should apply to.

Returns
the regular expression string.

Definition at line 191 of file abg-suppression.cc.

◆ get_is_artificial()

bool get_is_artificial ( ) const

Test is the suppression specification is artificial.

Artificial means that the suppression was automatically generated by libabigail, rather than being constructed from a suppression file provided by the user.

Returns
TRUE iff the suppression specification is artificial.

Definition at line 143 of file abg-suppression.cc.

◆ get_label()

const string get_label ( ) const

Getter for the label associated to this suppression specification.

Returns
the label.

Definition at line 160 of file abg-suppression.cc.

◆ get_soname_not_regex_str()

const string & get_soname_not_regex_str ( ) const

Getter of the "soname_not_regex_str property of the current instance of suppression_base.

The current suppression specification should apply to ABI artifacts of a shared library which SONAME does *NOT* match the regular expression string designated by the "soname_not_regex" property.

Returns
the regular expression string.

Definition at line 279 of file abg-suppression.cc.

◆ get_soname_regex_str()

const string & get_soname_regex_str ( ) const

Getter of the "soname_regex_str property of the current instance of suppression_base.

The "soname_regex_str" is a regular expression string that designates the soname of the shared library that contains the ABI artifacts this suppression should apply to.

Returns
the regular expression string.

Definition at line 253 of file abg-suppression.cc.

◆ has_file_name_related_property()

bool has_file_name_related_property ( ) const

Test if the current suppression has a property related to file name.

Returns
true iff the current suppression has either a file_name_regex or a file_name_not_regex property.

Definition at line 226 of file abg-suppression.cc.

◆ has_soname_related_property()

bool has_soname_related_property ( ) const

Test if the current suppression has a property related to SONAMEs.

Returns
true iff the current suppression has either a soname_regex or a soname_not_regex property.

Definition at line 287 of file abg-suppression.cc.

◆ set_drops_artifact_from_ir()

void set_drops_artifact_from_ir ( bool  f)

Set the flag that says whether the current suppression specification is to avoid adding the matched ABI artifact to the internal representation or not.

Parameters
fthe flag to set to true iff the current suppression specification is to avoid adding the matched ABI artifact to the internal representation.

Definition at line 132 of file abg-suppression.cc.

◆ set_file_name_not_regex_str()

void set_file_name_not_regex_str ( const string &  regexp)

Setter for the "file_name_not_regex" property of the current instance of suppression_base.

The current suppression specification should apply to ABI artifacts of a file which name does *NOT* match the regular expression string designated by the "file_name_not_regex" property.

Parameters
regexpthe new regular expression string.

Definition at line 204 of file abg-suppression.cc.

◆ set_file_name_regex_str()

void set_file_name_regex_str ( const string &  regexp)

Setter for the "file_name_regex" property of the current instance of suppression_base.

The "file_name_regex" property is a regular expression string that designates the file name that contains the ABI artifact this suppression should apply to.

Parameters
regexpthe new regular expression string.

Definition at line 179 of file abg-suppression.cc.

◆ set_is_artificial()

void set_is_artificial ( bool  f)

Set a flag saying if the suppression specification is artificial or not.

Artificial means that the suppression was automatically generated by libabigail, rather than being constructed from a suppression file provided by the user.

Definition at line 153 of file abg-suppression.cc.

◆ set_label()

void set_label ( const string &  label)

Setter for the label associated to this suppression specification.

Parameters
labelthe new label.

Definition at line 167 of file abg-suppression.cc.

◆ set_soname_not_regex_str()

void set_soname_not_regex_str ( const string &  regexp)

Setter of the "soname_not_regex_str property of the current instance of suppression_base.

The current suppression specification should apply to ABI artifacts of a shared library which SONAME does *NOT* match the regular expression string designated by the "soname_not_regex" property.

Parameters
regexpthe new regular expression string.

Definition at line 266 of file abg-suppression.cc.

◆ set_soname_regex_str()

void set_soname_regex_str ( const string &  regexp)

Setter of the "soname_regex_str property of the current instance of suppression_base.

The "soname_regex_str" is a regular expression string that designates the soname of the shared library that contains the ABI artifacts this suppression should apply to.

Parameters
regexpthe new regular expression string.

Definition at line 241 of file abg-suppression.cc.

Friends And Related Function Documentation

◆ suppression_matches_soname

bool suppression_matches_soname ( const string &  soname,
const suppression_base suppr 
)
friend

Test if a given SONAME is matched by a given suppression specification.

Parameters
sonamethe SONAME to consider.
supprthe suppression specification to consider.
Returns
true iff a given SONAME is matched by a given suppression specification.

Definition at line 4883 of file abg-suppression.cc.

◆ suppression_matches_soname_or_filename

bool suppression_matches_soname_or_filename ( const string &  soname,
const string &  filename,
const suppression_base suppr 
)
friend

Test if a given SONAME or file name is matched by a given suppression specification.

Parameters
sonamethe SONAME to consider.
filenamethe file name to consider.
supprthe suppression specification to consider.
Returns
true iff either soname or filename is matched by the suppression specification suppr.

Definition at line 4901 of file abg-suppression.cc.


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