Public Member Functions | Public Attributes | List of all members
citem_t Struct 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_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)
size_t print1 (char *buf, size_t bufsize, 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.


Definition at line 1609 of file hexrays.hpp.

Member Function Documentation

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 4922 of file hexrays.hpp.

References hexdsp.

size_t citem_t::print1 ( char *  buf,
size_t  bufsize,
const cfunc_t func 
) const

Print item into one line.

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

Definition at line 2641 of file hexrays.hpp.

Member Data Documentation

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 1613 of file hexrays.hpp.

Referenced by swap().