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...
 
class  named_boundary
 An insertion_range boundary that is expressed as a named constant that is to be evaluated later in the context of a given type and resolved to 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...
 
typedef shared_ptr< named_boundarynamed_boundary_sptr
 Convenience typedef for a shared_ptr to a named_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 (ini::function_call_expr_sptr)
 Create a function call expression boundary. 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::integer_boundary_sptr create_integer_boundary (int value)
 Create an integer boundary. More...
 
static insertion_range::named_boundary_sptr create_named_boundary (const string &)
 Create a named 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 359 of file abg-suppression.h.

Member Typedef Documentation

typedef shared_ptr<boundary> boundary_sptr

Convenience typedef for a shared_ptr to boundary.

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

Convenience typedef for a shared_ptr to a fn_call_expr_boundary.

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

Convenience typedef for a shared_ptr to a integer_boundary.

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

typedef shared_ptr<named_boundary> named_boundary_sptr

Convenience typedef for a shared_ptr to a named_boundary.

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

Constructor & Destructor Documentation

Default Constructor of type_suppression::insertion_range.

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

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 1428 of file abg-suppression.cc.

Member Function Documentation

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 1439 of file abg-suppression.cc.

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 1633 of file abg-suppression.cc.

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 1476 of file abg-suppression.cc.

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 1492 of file abg-suppression.cc.

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 1461 of file abg-suppression.cc.

type_suppression::insertion_range::named_boundary_sptr create_named_boundary ( const string &  name)
static

Create a named boundary.

The return value is to be used as a boundary for an instance of type_suppression::insertion_range. The value of that boundary is a named constant that is to be evaluated to an integer value, in the context of a class_decl. That evaluate is performed by the function type_suppression::insertion_range::eval_boundary().

Parameters
namethe name of the boundary.
Returns
the newly created named boundary.

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

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 1448 of file abg-suppression.cc.

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 1532 of file abg-suppression.cc.


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