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

A functor to sort decls somewhat topologically. That is, types are sorted in a way that makes the ones that are defined "first" to come first. More...

#include <abg-ir-priv.h>

Public Member Functions

bool has_artificial_or_natural_location (const decl_base *d)
 Test if a decl has an artificial or natural location. More...
 
bool has_artificial_or_natural_location (const type_base *t)
 Test if a type has an artificial or natural location. More...
 
bool operator() (const decl_base *f, const decl_base *s)
 The "Less Than" comparison operator of this functor. More...
 
bool operator() (const decl_base_sptr &f, const decl_base_sptr &s)
 The "Less Than" comparison operator of this functor. More...
 

Detailed Description

A functor to sort decls somewhat topologically. That is, types are sorted in a way that makes the ones that are defined "first" to come first.

The topological criteria is a lexicographic sort of the definition location of the type. For types that have no location (or the same location), it's their qualified name that is used for the lexicographic sort.

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

Member Function Documentation

◆ has_artificial_or_natural_location() [1/2]

bool has_artificial_or_natural_location ( const decl_base d)
inline

Test if a decl has an artificial or natural location.

Parameters
dthe decl to consider
Returns
true iff d has a location.

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

◆ has_artificial_or_natural_location() [2/2]

bool has_artificial_or_natural_location ( const type_base t)
inline

Test if a type has an artificial or natural location.

Parameters
tthe type to consider
Returns
true iff t has a location.

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

◆ operator()() [1/2]

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

The "Less Than" comparison operator of this functor.

Parameters
fthe first decl to be considered for the comparison.
sthe second decl to be considered for the comparison.
Returns
true iff f is less than s.

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

◆ operator()() [2/2]

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

The "Less Than" comparison operator of this functor.

Parameters
fthe first decl to be considered for the comparison.
sthe second decl to be considered for the comparison.
Returns
true iff f is less than s.

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


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