SDK Reference

Basic ctree element. More...

Inheritance diagram for citem_t:
cexpr_t cinsn_t carg_t ccase_t

Public Member Functions

 citem_t (ctype_t o)
void swap (citem_t &r)
 Swap two citem_t.
bool is_expr (void) const
 Is an expression?
bool contains_expr (const cexpr_t *e) const
 Does the item contain an expression?
bool contains_label (void) const
 Does the item contain a label?
const citem_tfind_parent_of (const citem_t *sitem) const
 Find parent of the specified item. More...
citem_tfind_parent_of (const citem_t *item)
citem_tfind_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
 address that corresponds to the item
ctype_t op
 element type
int label_num
 label number. More...
int index
 item index. meaningful only after print_func()

Detailed Description

Basic ctree element.

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, elements of pure citem_t type must never be created. Two classes, cexpr_t and cinsn_t are derived from it.

hexrays_sample14.cpp, hexrays_sample17.cpp, and hexrays_sample5.cpp.

Definition at line 5756 of file hexrays.hpp.

Member Function Documentation

◆ find_parent_of()

const citem_t * citem_t::find_parent_of ( const citem_t sitem) const

Find parent of the specified item.

sitemItem to find the parent of. The search will be performed among the children of the item pointed by this.
NULL if not found

Definition at line 11078 of file hexrays.hpp.

References hexdsp.

◆ print1()

void citem_t::print1 ( qstring *  vout,
const cfunc_t func 
) const

Print item into one line.

voutoutput buffer
funcparent function. This argument is used to find out the referenced variable names.
length of the generated text.

Definition at line 6903 of file hexrays.hpp.

Member Data Documentation

◆ label_num

int citem_t::label_num

label number.

-1 means no label. items of expression types (cot_...) should not have labels at the final maturity level, but at the intermediate levels any ctree element may have a label. Labels must be unique. Usually they correspond to the basic block numbers.

Definition at line 5760 of file hexrays.hpp.

Referenced by swap().