libabigail
Public Member Functions | Protected Member Functions | List of all members
traversable_base Class Reference

The interface for types which are feeling social and want to be visited during the traversal of a hierarchy of nodes. More...

#include <abg-traverse.h>

Inheritance diagram for traversable_base:
[legend]

Public Member Functions

virtual ~traversable_base ()
 Destructor of the traversable_base type. More...
 

Protected Member Functions

 traversable_base ()
 Default constructor of the traversable_base type. More...
 
bool visiting () const
 This should returns false before and after the node has been visiting. During the visiting of the node (and of its children) this should return true. More...
 
void visiting (bool f)
 The traversing code should be responsible of calling this, not the user code. More...
 

Detailed Description

The interface for types which are feeling social and want to be visited during the traversal of a hierarchy of nodes.

It is expected that classes derived from traversable_base define a traverse method specialised to the node *visitor* type. Such methods should visit nodes recursively, calling ir_node_visitor::visit for each node. The method should return true until all nodes have been visited.

Definition at line 38 of file abg-traverse.h.

Constructor & Destructor Documentation

◆ traversable_base()

traversable_base ( )
protected

Default constructor of the traversable_base type.

Definition at line 34 of file abg-traverse.cc.

◆ ~traversable_base()

~traversable_base ( )
virtual

Destructor of the traversable_base type.

Definition at line 39 of file abg-traverse.cc.

Member Function Documentation

◆ visiting() [1/2]

bool visiting ( ) const
protected

This should returns false before and after the node has been visiting. During the visiting of the node (and of its children) this should return true.

Returns
true if the current node is being visited.

Definition at line 48 of file abg-traverse.cc.

◆ visiting() [2/2]

void visiting ( bool  f)
protected

The traversing code should be responsible of calling this, not the user code.

This is the setter of the "visiting" flag of the node being visited. If set to yes, it means the node is being visited. False means either the node has not yet been visited, or it has already been visited.

Parameters
fthe new value of the "visiting" flag.

Definition at line 61 of file abg-traverse.cc.


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