libabigail
Public Member Functions | List of all members
file_suppression Class Reference

Abstraction of a suppression specification to avoid loading a file. More...

#include <abg-suppression.h>

Inheritance diagram for file_suppression:
[legend]

Public Member Functions

 file_suppression (const string &label, const string &file_name_regex, const string &file_name_not_regex)
 Constructor for the the file_suppression type. More...
 
virtual ~file_suppression ()
 Destructor of file_suppression. More...
 
virtual bool suppresses_diff (const diff *diff) const
 Test if instances of this file_suppression suppresses a certain instance of diff. More...
 
bool suppresses_file (const string &file_path)
 Test if a instances of this file_suppression suppresses a given file. More...
 
- Public Member Functions inherited from suppression_base
 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...
 

Additional Inherited Members

- Public Attributes inherited from suppression_base
std::unique_ptr< privpriv_
 

Detailed Description

Abstraction of a suppression specification to avoid loading a file.

This can be used by a tool that loads (binary) files, to know which file it has to avoid loading.

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

Constructor & Destructor Documentation

◆ file_suppression()

file_suppression ( const string &  label,
const string &  fname_regex_str,
const string &  fname_not_regex_str 
)

Constructor for the the file_suppression type.

Parameters
labelthe label of the suppression directive.
fname_regex_strthe regular expression string that designates the file name that instances of file_suppression should match.
fname_not_regex_strthe regular expression string that designates the file name that instances of file_suppression shoult *NOT* match. In other words, this file_suppression should be activated if its file name does not match the regular expression fname_not_regex_str.

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

◆ ~file_suppression()

~file_suppression ( )
virtual

Destructor of file_suppression.

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

Member Function Documentation

◆ suppresses_diff()

bool suppresses_diff ( const diff diff) const
virtual

Test if instances of this file_suppression suppresses a certain instance of diff.

This function always returns false because, obviously, a file_suppression is meants to prevents Abigail tools from loading some files. It is not meant to act on instance of diff.

Returns
false.

Implements suppression_base.

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

◆ suppresses_file()

bool suppresses_file ( const string &  file_path)

Test if a instances of this file_suppression suppresses a given file.

Parameters
file_paththe file path to test against.
Returns
true iff this file_suppression matches the file path file_path.

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


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