Basic ctree item. More...
#include <hexrays.hpp>

Public Member Functions | |
citem_t (ctype_t o=cot_empty) | |
void | swap (citem_t &r) |
Swap two citem_t. More... | |
bool | is_expr (void) const |
Is an expression? More... | |
bool | contains_expr (const cexpr_t *e) const |
Does the item contain an expression? More... | |
bool | contains_label (void) const |
Does the item contain a label? More... | |
const citem_t * | find_parent_of (const citem_t *sitem) const |
Find parent of the specified item. More... | |
citem_t * | find_parent_of (const citem_t *item) |
citem_t * | find_closest_addr (ea_t _ea) |
void | print1 (qstring *vout, const cfunc_t *func) const |
Print item into one line. More... | |
Public Attributes | |
ea_t | ea = BADADDR |
address that corresponds to the item. may be BADADDR More... | |
ctype_t | op = cot_empty |
item type More... | |
int | label_num = -1 |
label number. More... | |
int | index = -1 |
an index in cfunc_t::treeitems. More... | |
Detailed Description
Basic ctree item.
This is an abstract class (but we don't use virtual functions in ctree, so the compiler will not disallow you to create citem_t instances). However, items of pure citem_t type must never be created. Two classes, cexpr_t and cinsn_t are derived from it.
- Examples
- hexrays_sample14.cpp, hexrays_sample17.cpp, and hexrays_sample5.cpp.
Definition at line 6064 of file hexrays.hpp.
Constructor & Destructor Documentation
◆ citem_t()
citem_t::citem_t | ( | ctype_t | o = cot_empty | ) |
Definition at line 6075 of file hexrays.hpp.
◆ ~citem_t()
citem_t::~citem_t | ( | void | ) |
Definition at line 6098 of file hexrays.hpp.
Member Function Documentation
◆ contains_expr()
bool citem_t::contains_expr | ( | const cexpr_t * | e | ) | const |
Does the item contain an expression?
Definition at line 11618 of file hexrays.hpp.
◆ contains_label()
bool citem_t::contains_label | ( | void | ) | const |
Does the item contain a label?
Definition at line 11624 of file hexrays.hpp.
◆ find_closest_addr()
citem_t * citem_t::find_closest_addr | ( | ea_t | _ea | ) |
- Examples
- hexrays_sample14.cpp.
Definition at line 11636 of file hexrays.hpp.
◆ find_parent_of() [1/2]
Definition at line 6094 of file hexrays.hpp.
◆ find_parent_of() [2/2]
Find parent of the specified item.
- Parameters
-
sitem Item to find the parent of. The search will be performed among the children of the item pointed by this
.
- Returns
- nullptr if not found
- Examples
- hexrays_sample17.cpp.
Definition at line 11630 of file hexrays.hpp.
◆ is_expr()
bool citem_t::is_expr | ( | void | ) | const |
◆ print1()
void citem_t::print1 | ( | qstring * | vout, |
const cfunc_t * | func | ||
) | const |
Print item into one line.
- Parameters
-
vout output buffer func parent function. This argument is used to find out the referenced variable names.
- Returns
- length of the generated text.
Definition at line 7246 of file hexrays.hpp.
◆ swap()
void citem_t::swap | ( | citem_t & | r | ) |
Member Data Documentation
◆ ea
ea_t citem_t::ea = BADADDR |
address that corresponds to the item. may be BADADDR
- Examples
- hexrays_sample14.cpp, hexrays_sample17.cpp, hexrays_sample3.cpp, hexrays_sample5.cpp, and hexrays_sample7.cpp.
Definition at line 6066 of file hexrays.hpp.
Referenced by swap().
◆ index
|
mutable |
an index in cfunc_t::treeitems.
meaningful only after print_func()
Definition at line 6073 of file hexrays.hpp.
◆ label_num
int citem_t::label_num = -1 |
label number.
-1 means no label. items of the expression types (cot_...) should not have labels at the final maturity level, but at the intermediate levels any ctree item may have a label. Labels must be unique. Usually they correspond to the basic block numbers.
Definition at line 6068 of file hexrays.hpp.
Referenced by swap().
◆ op
ctype_t citem_t::op = cot_empty |
item type
- Examples
- hexrays_sample17.cpp, hexrays_sample2.cpp, hexrays_sample3.cpp, hexrays_sample5.cpp, and hexrays_sample7.cpp.
Definition at line 6067 of file hexrays.hpp.
Referenced by ctree_parentee_t::get_block(), cexpr_t::is_call_arg_of(), cexpr_t::is_call_object_of(), and swap().