#include <suifkernel/group_walker.h>
Inheritance diagram for ReplacingWalker:
Public Methods | |
ReplacingWalker (SuifEnv *the_env) | |
virtual bool | is_walkable (Address address,bool is_owned, const MetaClass *_meta) |
Determine if the tree rooted at the address should be walked Default implementation returns true iff is_owned is true. More... | |
Walker::ApplyStatus | operator() (SuifObject *x) |
void | add_replacement (Object *from,Object *to) |
Add a replacement for an object. More... | |
Object* | get_replacement (Object *x) const |
You can lookup replacement values here. | |
bool | get_makes_changes () const |
This walker makes changes to the tree, so override get_makes_changes. | |
bool | is_changed (Address addr) const |
Has a given node changed? If so, we do not walk it (it may even be deleted. | |
suif_hash_map<Address,Object *>::iterator | get_map_begin () |
Export of the iterator for the map. | |
suif_hash_map<Address,Object *>::iterator | get_map_end () |
suif_hash_map<Address,Object *>::const_iterator | get_map_begin () const |
suif_hash_map<Address,Object *>::const_iterator | get_map_end () const |
It differs from a GroupWalker in the following ways:
|
|
Add a replacement for an object.
Note that if you enter a value during a walk, it must be for a value that has not been visited yet
|
|
|
Export of the iterator for the map.
|
|
|
You can lookup replacement values here.
|
Has a given node changed? If so, we do not walk it (it may even be deleted.
Reimplemented from Walker.
|
Determine if the tree rooted at the address should be walked Default implementation returns true iff is_owned is true.
You can, for example, return false if you know that a node of interest cannot be contained inside a given node.
Notice the difference to is_visitable. The latter determines if the function operator should be called on a given node. This function controls walking of an entire subtree.
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 from Walker.
|
Reimplemented from GroupWalker.