IDA C++ SDK 9.2
Loading...
Searching...
No Matches
idc_value_t Class Reference

Class to hold idc values. More...

#include <expr.hpp>

Public Member Functions

 idc_value_t (sval_t n=0)
 Create a #VT_LONG value.
 idc_value_t (const idc_value_t &r)
 Create a $VT_LONG with an existing idc value.
 idc_value_t (const char *_str)
 Create a #VT_STR value.
 idc_value_t (const qstring &_str)
 Create a #VT_STR value.
 ~idc_value_t (void)
 Destructor.
void clear (void)
 See free_idcv()
idc_value_toperator= (const idc_value_t &r)
 Assign this value to an existing value.
qstringqstr (void)
 #VT_STR
const qstringqstr (void) const
 #VT_STR
const char * c_str (void) const
 #VT_STR
const ucharu_str (void) const
 #VT_STR
void swap (idc_value_t &v)
 Set this = r and v = this.
bool is_zero (void) const
 Does value represent the integer 0?
bool is_integral (void)
 Does value represent a whole number?
bool is_convertible (void) const
 Convertible types are #VT_LONG, #VT_FLOAT, #VT_INT64, and #VT_STR.
Warning

The following functions do not free the existing data!

When the contents are unknown, use the functions without a leading underscore.

void _create_empty_string (void)
void _set_string (const qstring &_str)
void _set_string (const char *_str, size_t len)
void _set_string (const char *_str)
void _set_long (sval_t v)
void _set_pvoid (void *p)
void _set_int64 (int64 v)
void _set_float (const fpvalue_t &f)
Setters

These functions ensure the previous value is cleared

void create_empty_string (void)
void set_string (const char *_str, size_t len)
void set_string (const char *_str)
void set_string (const qstring &_str)
void set_long (sval_t v)
void set_pvoid (void *p)
void set_int64 (int64 v)
void set_float (const fpvalue_t &f)

Public Attributes

char vtype = VT_LONG
 IDC value types
union { 
   sval_t   num 
 #VT_LONG More...
   fpvalue_t   e 
 #VT_FLOAT More...
   idc_object_t *   obj 
   int   funcidx 
 #VT_FUNC More...
   void *   pvoid 
 #VT_PVOID More...
   int64   i64 
 #VT_INT64 More...
   uchar   reserve [sizeof(qstring)] 
 VT_STR. More...
}; 

Detailed Description

Class to hold idc values.

Constructor & Destructor Documentation

◆ idc_value_t() [1/4]

idc_value_t::idc_value_t ( sval_t n = 0)
inline

Create a #VT_LONG value.

◆ idc_value_t() [2/4]

idc_value_t::idc_value_t ( const idc_value_t & r)
inline

Create a $VT_LONG with an existing idc value.

◆ idc_value_t() [3/4]

idc_value_t::idc_value_t ( const char * _str)
inline

Create a #VT_STR value.

◆ idc_value_t() [4/4]

idc_value_t::idc_value_t ( const qstring & _str)
inline

Create a #VT_STR value.

◆ ~idc_value_t()

idc_value_t::~idc_value_t ( void )
inline

Destructor.

Member Function Documentation

◆ clear()

void idc_value_t::clear ( void )
inline

◆ operator=()

idc_value_t & idc_value_t::operator= ( const idc_value_t & r)
inline

Assign this value to an existing value.

◆ qstr() [1/2]

qstring & idc_value_t::qstr ( void )
inline

#VT_STR

◆ qstr() [2/2]

const qstring & idc_value_t::qstr ( void ) const
inline

#VT_STR

◆ c_str()

const char * idc_value_t::c_str ( void ) const
inline

#VT_STR

◆ u_str()

const uchar * idc_value_t::u_str ( void ) const
inline

#VT_STR

◆ swap()

void idc_value_t::swap ( idc_value_t & v)
inline

Set this = r and v = this.

◆ is_zero()

bool idc_value_t::is_zero ( void ) const
inline

Does value represent the integer 0?

◆ is_integral()

bool idc_value_t::is_integral ( void )
inline

Does value represent a whole number?

◆ is_convertible()

bool idc_value_t::is_convertible ( void ) const
inline

Convertible types are #VT_LONG, #VT_FLOAT, #VT_INT64, and #VT_STR.

◆ _create_empty_string()

void idc_value_t::_create_empty_string ( void )
inline

◆ _set_string() [1/3]

void idc_value_t::_set_string ( const qstring & _str)
inline

◆ _set_string() [2/3]

void idc_value_t::_set_string ( const char * _str,
size_t len )
inline

◆ _set_string() [3/3]

void idc_value_t::_set_string ( const char * _str)
inline

◆ _set_long()

void idc_value_t::_set_long ( sval_t v)
inline

◆ _set_pvoid()

void idc_value_t::_set_pvoid ( void * p)
inline

◆ _set_int64()

void idc_value_t::_set_int64 ( int64 v)
inline

◆ _set_float()

void idc_value_t::_set_float ( const fpvalue_t & f)
inline

◆ create_empty_string()

void idc_value_t::create_empty_string ( void )
inline

◆ set_string() [1/3]

void idc_value_t::set_string ( const char * _str,
size_t len )
inline

◆ set_string() [2/3]

void idc_value_t::set_string ( const char * _str)
inline

◆ set_string() [3/3]

void idc_value_t::set_string ( const qstring & _str)
inline

◆ set_long()

void idc_value_t::set_long ( sval_t v)
inline

◆ set_pvoid()

void idc_value_t::set_pvoid ( void * p)
inline

◆ set_int64()

void idc_value_t::set_int64 ( int64 v)
inline

◆ set_float()

void idc_value_t::set_float ( const fpvalue_t & f)
inline

Member Data Documentation

◆ vtype

char idc_value_t::vtype = VT_LONG

◆ num

sval_t idc_value_t::num

#VT_LONG

◆ e

fpvalue_t idc_value_t::e

#VT_FLOAT

◆ obj

idc_object_t* idc_value_t::obj

◆ funcidx

int idc_value_t::funcidx

#VT_FUNC

◆ pvoid

void* idc_value_t::pvoid

#VT_PVOID

◆ i64

int64 idc_value_t::i64

#VT_INT64

◆ reserve

uchar idc_value_t::reserve[sizeof(qstring)]

VT_STR.

◆ [union]

union { ... } idc_value_t

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