Class Hierarchy   Compound List   File List   Header Files   Compound Members   File Members  

Walker Class Reference

This is the base class for all Walkers. More...

#include <iokernel/walker.h>

Class diagram for Walker:

SuifWalker SelectiveWalker GroupWalker AllWalker type_checker_walker Unowned SymbolNamer ProcedureWalker Padding NonConstDimExpressionWalker NonConstBoundArrayTypeWalker CountIndirectCalls_Walker CountCallsWalker CollisionAvoider ReplacingWalker RemoveIfAndLoopWalker

List of all members.

Public Members


Detailed Description

This is the base class for all Walkers.

This class is abstract. Generally, you will want to derive from SuifWalker found in suifkernel/suif_walker.h. The normal use of walkers is described in that file.

See also:
suif_walker.h

Member Enumeration Documentation

enum Walker::ApplyStatus

Status codes that can be returned by the operator().

The internal status should not be modified by the operator code.

Enumeration values:


Member Function Documentation

Walker::Walker (SuifEnv * the_env)

virtual ApplyStatus Walker::operator() (Address address, const MetaClass * _meta) [pure virtual]

Called by the walker to perform action on the data in address.

Subclass must overwrite this method.

Parameters:
address - address of the data to be applied on.
_meta - meta class of the data in address.

Reimplemented in SuifWalker.

virtual bool Walker::is_walkable (Address address, bool is_owned, const MetaClass * _meta) [virtual]

Determine if operator() should be called on the pointer in address.

Default implementation returns true iff is_owned is true.

Parameters:
address - (a pointer to) a pointer.
is_owned - true if the pointer pointed to by address is owned by this object.
_meta - the meta class of the pointer in address. This meta class will be a subclass of PointerMetaClass.

Reimplemented in ReplacingWalker and AllWalker.

virtual bool Walker::is_visitable (Address address, const MetaClass * _meta) const [virtual]

Determine if operator() should be called on the data in address.

Default implementation always true.

Parameters:
address - points to the data.
_meta - the meta class of the data pointed to by address.

Reimplemented in SuifWalker and SelectiveWalker.

void Walker::set_post_order ()

Set the order of walking to post_order.

Default is pre_order.

void Walker::set_pre_order ()

Set the order of walking to pre_order, which is the default.

bool Walker::get_is_pre_order () const

Get the order of walking.

Returns:
true iff the order is pre-order.

void Walker::set_address (Address new_address)

Address Walker::get_address () const

SuifEnv * Walker::get_env () const

void Walker::set_parent (Address addr)

Address Walker::get_parent () const


The documentation for this class was generated from the following file:
Generated at Mon Nov 22 19:43:56 1999 for NCI SUIF by doxygen  written by Dimitri van Heesch, © 1997-1999