Latest available version: IDA and decompilers v8.4.240320sp1 see all releases
Hex-Rays logo State-of-the-art binary code analysis tools
email icon

Switch case. Usually cinsn_t is a block. More...

#include <hexrays.hpp>

Inheritance diagram for ccase_t:
cinsn_t citem_t

Public Member Functions

 DECLARE_COMPARISONS (ccase_t)
 
void set_insn (cinsn_t *i)
 
size_t size () const
 
const uint64 & value (int i) const
 
- Public Member Functions inherited from cinsn_t
 cinsn_t (const cinsn_t &r)
 
void swap (cinsn_t &r)
 
cinsn_toperator= (const cinsn_t &r)
 
cinsn_tassign (const cinsn_t &r)
 
 DECLARE_COMPARISONS (cinsn_t)
 
void replace_by (cinsn_t *r)
 Replace the statement. More...
 
void cleanup ()
 Cleanup the statement. More...
 
void zero ()
 Overwrite with zeroes without cleaning memory or deleting children. More...
 
cinsn_tnew_insn (ea_t insn_ea)
 Create a new statement. More...
 
cif_tcreate_if (cexpr_t *cnd)
 Create a new if-statement. More...
 
void print (int indent, vc_printer_t &vp, use_curly_t use_curly=CALC_CURLY_BRACES) const
 Print the statement into many lines. More...
 
void print1 (qstring *vout, const cfunc_t *func) const
 Print the statement into one line. More...
 
bool is_ordinary_flow () const
 Check if the statement passes execution to the next statement. More...
 
bool contains_insn (ctype_t type, int times=1) const
 Check if the statement contains a statement of the specified type. More...
 
bool collect_free_breaks (cinsnptrvec_t *breaks)
 Collect free break statements. More...
 
bool collect_free_continues (cinsnptrvec_t *continues)
 Collect free continue statements. More...
 
bool contains_free_break () const
 Check if the statement has free break statements. More...
 
bool contains_free_continue () const
 Check if the statement has free continue statements. More...
 
const char * dstr () const
 
- Public Member Functions inherited from citem_t
 citem_t (ctype_t o=cot_empty)
 
void swap (citem_t &r)
 Swap two citem_t. More...
 
bool is_expr () const
 Is an expression? More...
 
bool contains_expr (const cexpr_t *e) const
 Does the item contain an expression? More...
 
bool contains_label () const
 Does the item contain a label? More...
 
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

uint64vec_t values
 List of case values. More...
 
- Public Attributes inherited from cinsn_t
union {
   cblock_t *   cblock
 details of block-statement More...
 
   cexpr_t *   cexpr
 details of expression-statement More...
 
   cif_t *   cif
 details of if-statement More...
 
   cfor_t *   cfor
 details of for-statement More...
 
   cwhile_t *   cwhile
 details of while-statement More...
 
   cdo_t *   cdo
 details of do-statement More...
 
   cswitch_t *   cswitch
 details of switch-statement More...
 
   creturn_t *   creturn
 details of return-statement More...
 
   cgoto_t *   cgoto
 details of goto-statement More...
 
   casm_t *   casm
 details of asm-statement More...
 
}; 
 
- Public Attributes inherited from citem_t
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

Switch case. Usually cinsn_t is a block.

Definition at line 6608 of file hexrays.hpp.

Member Function Documentation

◆ size()

size_t ccase_t::size ( ) const

Definition at line 6614 of file hexrays.hpp.

◆ value()

const uint64 & ccase_t::value ( int  i) const

Definition at line 6615 of file hexrays.hpp.

Member Data Documentation

◆ values

uint64vec_t ccase_t::values

List of case values.

if empty, then 'default' case

Definition at line 6610 of file hexrays.hpp.