IDA C++ SDK 9.2
Loading...
Searching...
No Matches
ctree_parentee_t Struct Reference

A helper ctree traversal class that maintains parent information. More...

#include <hexrays.hpp>

Inheritance diagram for ctree_parentee_t:
ctree_visitor_t cfunc_parentee_t

Public Member Functions

 ctree_parentee_t (bool post=false)
bool hexapi recalc_parent_types ()
 Recalculate type of parent nodes.
Public Member Functions inherited from ctree_visitor_t
bool maintain_parents () const
 Should the parent information by maintained?
bool must_prune () const
 Should the traversal skip the children of the current item?
bool must_restart () const
 Should the traversal restart?
bool is_postorder () const
 Should the leave...() functions be called?
bool only_insns () const
 Should all expressions be automatically pruned?
void prune_now ()
 Prune children.
void clr_prune ()
 Do not prune children. This is an internal function, no need to call it.
void set_restart ()
 Restart the travesal. Meaningful only in apply_to_exprs()
void clr_restart ()
 Do not restart. This is an internal function, no need to call it.
 ctree_visitor_t (int _flags)
 Constructor.
virtual ~ctree_visitor_t ()
int hexapi apply_to (citem_t *item, citem_t *parent)
 Traverse ctree.
int hexapi apply_to_exprs (citem_t *item, citem_t *parent)
 Traverse only expressions.
citem_tparent_item ()
 Get parent of the current item as an item (statement or expression)
cexpr_tparent_expr ()
 Get parent of the current item as an expression.
cinsn_tparent_insn ()
 Get parent of the current item as a statement.
virtual int idaapi visit_insn (cinsn_t *)
 Visit a statement.
virtual int idaapi visit_expr (cexpr_t *)
 Visit an expression.
virtual int idaapi leave_insn (cinsn_t *)
 Visit a statement after having visited its children.
virtual int idaapi leave_expr (cexpr_t *)
 Visit an expression after having visited its children.

Additional Inherited Members

Public Attributes inherited from ctree_visitor_t
int cv_flags
 Ctree visitor property bits
parents_t parents
 Vector of parents of the current item.
cblock_posvec_t bposvec
 Vector of block positions.

Detailed Description

A helper ctree traversal class that maintains parent information.

Constructor & Destructor Documentation

◆ ctree_parentee_t()

ctree_parentee_t::ctree_parentee_t ( bool post = false)
inline

Member Function Documentation

◆ recalc_parent_types()

bool ctree_parentee_t::recalc_parent_types ( )
inline

Recalculate type of parent nodes.

If a node type has been changed, the visitor must recalculate all parent types, otherwise the ctree becomes inconsistent. If during this recalculation a parent node is added/deleted, this function returns true. In this case the traversal must be stopped because the information about parent nodes is stale.

Returns
false-ok to continue the traversal, true-must stop.

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