libabigail
Public Member Functions | List of all members
sort_for_hash_functor Struct Reference

Functor used to sort types before hashing them. More...

#include <abg-ir-priv.h>

Public Member Functions

bool operator() (const type_base &f, const type_base &s)
 "Less Than" operator for type IR nodes. More...
 
bool operator() (const type_base *f, const type_base *s)
 "Less Than" operator for type IR nodes. More...
 
bool operator() (const type_base_sptr &f, const type_base_sptr &s)
 "Less Than" operator for type IR nodes. More...
 
size_t rank (enum type_or_decl_base::type_or_decl_kind k)
 Return the rank of a given kind of IR node. More...
 

Detailed Description

Functor used to sort types before hashing them.

Definition at line 1295 of file abg-ir-priv.h.

Member Function Documentation

bool operator() ( const type_base f,
const type_base s 
)
inline

"Less Than" operator for type IR nodes.

This returns true iff the first operand is less than the second one.

IR nodes are first sorted using their rank. Two IR node of the same rank are then sorted using their qualified name.

Parameters
fthe first operand to consider.
sthe second operand to consider.

Definition at line 1354 of file abg-ir-priv.h.

bool operator() ( const type_base f,
const type_base s 
)
inline

"Less Than" operator for type IR nodes.

This returns true iff the first operand is less than the second one.

IR nodes are first sorted using their rank. Two IR node of the same rank are then sorted using their qualified name.

Parameters
fthe first operand to consider.
sthe second operand to consider.

Definition at line 1386 of file abg-ir-priv.h.

bool operator() ( const type_base_sptr &  f,
const type_base_sptr &  s 
)
inline

"Less Than" operator for type IR nodes.

This returns true iff the first operand is less than the second one.

IR nodes are first sorted using their rank. Two IR node of the same rank are then sorted using their qualified name.

Parameters
fthe first operand to consider.
sthe second operand to consider.

Definition at line 1403 of file abg-ir-priv.h.

size_t rank ( enum type_or_decl_base::type_or_decl_kind  k)
inline

Return the rank of a given kind of IR node.

The rank is used to sort a kind of IR node relative to another one of a different kind. For instance, a an IR node of BASIC_TYPE kind has a lower rank than an IR node of ENUM_TYPE kind.

Parameters
kthe kind of a given IR node.
Returns
the rank of the IR node.

Definition at line 1308 of file abg-ir-priv.h.


The documentation for this struct was generated from the following file: