IDAPython 8.4
Loading...
Searching...
No Matches
ctree_visitor_t Class Reference

Proxy of C++ ctree_visitor_t class.

Inheritance diagram for ctree_visitor_t:
ctree_parentee_t cfunc_parentee_t

Public Member Functions

"bool" maintain_parents (self, *args)
 maintain_parents(self) -> bool Should the parent information by maintained?
 
"bool" must_prune (self, *args)
 must_prune(self) -> bool Should the traversal skip the children of the current item?
 
"bool" must_restart (self, *args)
 must_restart(self) -> bool Should the traversal restart?
 
"bool" is_postorder (self, *args)
 is_postorder(self) -> bool Should the leave...() functions be called?
 
"bool" only_insns (self, *args)
 only_insns(self) -> bool Should all expressions be automatically pruned?
 
"void" prune_now (self, *args)
 prune_now(self) Prune children.
 
"void" clr_prune (self, *args)
 clr_prune(self) Do not prune children.
 
"void" set_restart (self, *args)
 set_restart(self) Restart the travesal.
 
"void" clr_restart (self, *args)
 clr_restart(self) Do not restart.
 
 __init__ (self, *args)
 init(self, _flags) -> ctree_visitor_t
 
"int" apply_to (self, *args)
 apply_to(self, item, parent) -> int Traverse ctree.
 
"int" apply_to_exprs (self, *args)
 apply_to_exprs(self, item, parent) -> int Traverse only expressions.
 
"cexpr_t *" parent_expr (self, *args)
 parent_expr(self) -> cexpr_t Get parent of the current item as an expression.
 
"cinsn_t *" parent_insn (self, *args)
 parent_insn(self) -> cinsn_t Get parent of the current item as a statement.
 
"int" visit_insn (self, *args)
 visit_insn(self, arg0) -> int Visit a statement.
 
"int" visit_expr (self, *args)
 visit_expr(self, arg0) -> int Visit an expression.
 
"int" leave_insn (self, *args)
 leave_insn(self, arg0) -> int Visit a statement after having visited its children.
 
"int" leave_expr (self, *args)
 leave_expr(self, arg0) -> int Visit an expression after having visited its children.
 
 __disown__ (self)
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 
 cv_flags = property(_ida_hexrays.ctree_visitor_t_cv_flags_get, _ida_hexrays.ctree_visitor_t_cv_flags_set, doc=)
 
 parents = property(_ida_hexrays.ctree_visitor_t_parents_get, _ida_hexrays.ctree_visitor_t_parents_set, doc=)
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
* args )
Parameters
_flagsint

Reimplemented in cfunc_parentee_t, and ctree_parentee_t.

Member Function Documentation

◆ __disown__()

__disown__ ( self)

Reimplemented in cfunc_parentee_t, and ctree_parentee_t.

◆ apply_to()

"int" apply_to ( self,
* args )

The traversal will start at the specified item and continue until of one the visit_...() functions return a non-zero value.

Parameters
item(C++: citem_t *) root of the ctree to traverse
parent(C++: citem_t *) parent of the specified item. can be specified as nullptr.
Returns
: 0 or a non-zero value returned by a visit_...() function

◆ apply_to_exprs()

"int" apply_to_exprs ( self,
* args )

The traversal will start at the specified item and continue until of one the visit_...() functions return a non-zero value.

Parameters
item(C++: citem_t *) root of the ctree to traverse
parent(C++: citem_t *) parent of the specified item. can be specified as nullptr.
Returns
: 0 or a non-zero value returned by a visit_...() function

◆ clr_prune()

"void" clr_prune ( self,
* args )

This is an internal function, no need to call it.

◆ clr_restart()

"void" clr_restart ( self,
* args )

This is an internal function, no need to call it.

◆ is_postorder()

"bool" is_postorder ( self,
* args )

◆ leave_expr()

"int" leave_expr ( self,
* args )

This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs post-order traserval, i.e. an item is visited after its children.

Parameters
arg0cexpr_t *
Returns
: 0 to continue the traversal, nonzero to stop.

◆ leave_insn()

"int" leave_insn ( self,
* args )

This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs post-order traserval, i.e. an item is visited after its children.

Parameters
arg0cinsn_t *
Returns
: 0 to continue the traversal, nonzero to stop.

◆ maintain_parents()

"bool" maintain_parents ( self,
* args )

◆ must_prune()

"bool" must_prune ( self,
* args )

◆ must_restart()

"bool" must_restart ( self,
* args )

◆ only_insns()

"bool" only_insns ( self,
* args )

◆ parent_expr()

"cexpr_t *" parent_expr ( self,
* args )

◆ parent_insn()

"cinsn_t *" parent_insn ( self,
* args )

◆ prune_now()

"void" prune_now ( self,
* args )

This function may be called by a visitor() to skip all children of the current item.

◆ set_restart()

"void" set_restart ( self,
* args )

Meaningful only in apply_to_exprs()

◆ visit_expr()

"int" visit_expr ( self,
* args )

This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children.

Parameters
arg0cexpr_t *
Returns
: 0 to continue the traversal, nonzero to stop.

◆ visit_insn()

"int" visit_insn ( self,
* args )

This is a visitor function which should be overridden by a derived class to do some useful work. This visitor performs pre-order traserval, i.e. an item is visited before its children.

Parameters
arg0cinsn_t *
Returns
: 0 to continue the traversal, nonzero to stop.

Property Documentation

◆ cv_flags

cv_flags = property(_ida_hexrays.ctree_visitor_t_cv_flags_get, _ida_hexrays.ctree_visitor_t_cv_flags_set, doc=)
static

◆ parents

parents = property(_ida_hexrays.ctree_visitor_t_parents_get, _ida_hexrays.ctree_visitor_t_parents_set, doc=)
static

◆ thisown

thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

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