libabigail
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
type_suppression::insertion_range Class Reference

The abstraction of a range of offsets in which a member of a type might get inserted. More...

#include <abg-suppression.h>

Classes

class  boundary
 The abstraction of the boundary of an insertion_range, in the context of a type_suppression. More...
 
class  fn_call_expr_boundary
 An insertion_range boundary that is expressed as function call expression. The (integer) value of that expression is usually a bit offset. More...
 
class  integer_boundary
 An insertion_range boundary that is expressed as an integer value. That integer value is usually a bit offset. More...
 

Public Types

typedef shared_ptr< boundaryboundary_sptr
 Convenience typedef for a shared_ptr to boundary. More...
 
typedef shared_ptr< fn_call_expr_boundaryfn_call_expr_boundary_sptr
 Convenience typedef for a shared_ptr to a fn_call_expr_boundary. More...
 
typedef shared_ptr< integer_boundaryinteger_boundary_sptr
 Convenience typedef for a shared_ptr to a integer_boundary. More...
 

Public Member Functions

 insertion_range ()
 Default Constructor of type_suppression::insertion_range. More...
 
 insertion_range (boundary_sptr begin, boundary_sptr end)
 Constructor of type_suppression::insertion_range. More...
 
boundary_sptr begin () const
 Getter for the beginning of the range. More...
 
boundary_sptr end () const
 Getter for the end of the range. More...
 

Static Public Member Functions

static bool boundary_value_is_end (uint64_t value)
 Test if a given value supposed to be inside an insertion range represents the end of the range. More...
 
static insertion_range::fn_call_expr_boundary_sptr create_fn_call_expr_boundary (const string &)
 Create a function call expression boundary. More...
 
static insertion_range::fn_call_expr_boundary_sptr create_fn_call_expr_boundary (ini::function_call_expr_sptr)
 Create a function call expression boundary. More...
 
static insertion_range::integer_boundary_sptr create_integer_boundary (int value)
 Create an integer boundary. More...
 
static bool eval_boundary (const boundary_sptr boundary, const class_or_union *context, uint64_t &value)
 Evaluate an insertion range boundary to get a resulting integer value. More...
 

Detailed Description

The abstraction of a range of offsets in which a member of a type might get inserted.

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

Member Typedef Documentation

◆ boundary_sptr

typedef shared_ptr<boundary> boundary_sptr

Convenience typedef for a shared_ptr to boundary.

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

◆ fn_call_expr_boundary_sptr

Convenience typedef for a shared_ptr to a fn_call_expr_boundary.

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

◆ integer_boundary_sptr

Convenience typedef for a shared_ptr to a integer_boundary.

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

Constructor & Destructor Documentation

◆ insertion_range() [1/2]

Default Constructor of type_suppression::insertion_range.

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

◆ insertion_range() [2/2]

Constructor of type_suppression::insertion_range.

Parameters
beginthe start of the range. A range boundary that is an instance of interger_boundary with a negative value means the maximum possible value.
endthe end of the range. A range boundary that is an instance of interger_boundary with a negative value means the maximum possible value.

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

Member Function Documentation

◆ begin()

Getter for the beginning of the range.

Returns
the beginning of the range. A range boundary that is an instance of interger_boundary with a negative value means the maximum possible value.

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

◆ boundary_value_is_end()

bool boundary_value_is_end ( uint64_t  value)
static

Test if a given value supposed to be inside an insertion range represents the end of the range.

Parameters
valuethe value to test for.
Returns
true iff value represents the end of the insertion range.

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

◆ create_fn_call_expr_boundary() [1/2]

type_suppression::insertion_range::fn_call_expr_boundary_sptr create_fn_call_expr_boundary ( const string &  s)
static

Create a function call expression boundary.

The return value of this function is to be used as a boundary for an instance of type_suppression::insertion_range. The value of that boundary is actually a function call expression that itself evalutates to an integer value, in the context of a class_decl.

Parameters
sa string representing the expression the function call expression to create the boundary from.
Returns
the resulting function call expression boundary.

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

◆ create_fn_call_expr_boundary() [2/2]

Create a function call expression boundary.

The return value of this function is to be used as a boundary for an instance of type_suppression::insertion_range. The value of that boundary is actually a function call expression that itself evalutates to an integer value, in the context of a class_decl.

Parameters
exprthe function call expression to create the boundary from.
Returns
the resulting function call expression boundary.

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

◆ create_integer_boundary()

type_suppression::insertion_range::integer_boundary_sptr create_integer_boundary ( int  value)
static

Create an integer boundary.

The return value of this function is to be used as a boundary for an instance of type_suppression::insertion_range. That boundary evaluates to an integer value.

Parameters
valuethe value of the integer boundary.
Returns
the resulting integer boundary.

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

◆ end()

Getter for the end of the range.

Returns
the end of the range. A range boundary that is an instance of interger_boundary with a negative value means the maximum possible value.

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

◆ eval_boundary()

bool eval_boundary ( const boundary_sptr  boundary,
const class_or_union context,
uint64_t &  value 
)
static

Evaluate an insertion range boundary to get a resulting integer value.

Parameters
boundarythe boundary to evaluate.
contextthe context of evualuation. It's a class_decl to take into account during the evaluation, if there is a need for it.
Returns
true iff the evaluation was successful and value contains the resulting value.

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


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