Number representation. More...
#include <hexrays.hpp>
Public Member Functions | |
number_format_t (int _opnum=0) | |
Contructor. More... | |
int | get_radix () const |
Get number radix. More... | |
bool | is_fixed () const |
Is number representation fixed? Fixed representation cannot be modified by the decompiler. More... | |
bool | is_hex () const |
Is a hexadecimal number? More... | |
bool | is_dec () const |
Is a decimal number? More... | |
bool | is_oct () const |
Is a octal number? More... | |
bool | is_enum () const |
Is a symbolic constant? More... | |
bool | is_char () const |
Is a character constant? More... | |
bool | is_stroff () const |
Is a structure field offset? More... | |
bool | is_numop () const |
Is a number? More... | |
bool | needs_to_be_inverted () const |
Does the number need to be negated or bitwise negated? Returns true if the user requested a negation but it is not done yet. More... | |
bool | has_unmutable_type () const |
Public Attributes | |
flags_t | flags32 = 0 |
low 32bit of flags (for compatibility) More... | |
char | opnum |
operand number: 0..UA_MAXOP More... | |
char | props = 0 |
properties: combination of NF_ bits (Number format property bits) More... | |
uchar | serial = 0 |
for enums: constant serial number More... | |
char | org_nbytes = 0 |
original number size in bytes More... | |
qstring | type_name |
for stroffs: structure for offsetof() for enums: enum name More... | |
flags64_t | flags = 0 |
ida flags, which describe number radix, enum, etc More... | |
Detailed Description
Number representation.
This structure holds information about a number format.
- Examples
- hexrays_sample2.cpp, and hexrays_sample4.cpp.
Definition at line 788 of file hexrays.hpp.
Constructor & Destructor Documentation
◆ number_format_t()
number_format_t::number_format_t | ( | int | _opnum = 0 | ) |
Contructor.
Definition at line 811 of file hexrays.hpp.
Member Function Documentation
◆ get_radix()
int number_format_t::get_radix | ( | ) | const |
◆ has_unmutable_type()
bool number_format_t::has_unmutable_type | ( | ) | const |
Definition at line 844 of file hexrays.hpp.
◆ is_char()
bool number_format_t::is_char | ( | ) | const |
Is a character constant?
- Examples
- hexrays_sample4.cpp.
Definition at line 827 of file hexrays.hpp.
Referenced by is_numop().
◆ is_dec()
bool number_format_t::is_dec | ( | ) | const |
Is a decimal number?
Definition at line 821 of file hexrays.hpp.
References flags, get_radix(), and opnum.
◆ is_enum()
bool number_format_t::is_enum | ( | ) | const |
Is a symbolic constant?
- Examples
- hexrays_sample4.cpp.
Definition at line 825 of file hexrays.hpp.
Referenced by is_numop().
◆ is_fixed()
bool number_format_t::is_fixed | ( | ) | const |
Is number representation fixed? Fixed representation cannot be modified by the decompiler.
Definition at line 817 of file hexrays.hpp.
References props.
◆ is_hex()
bool number_format_t::is_hex | ( | ) | const |
Is a hexadecimal number?
Definition at line 819 of file hexrays.hpp.
References flags, get_radix(), and opnum.
◆ is_numop()
bool number_format_t::is_numop | ( | ) | const |
Is a number?
Definition at line 831 of file hexrays.hpp.
References is_char(), is_enum(), and is_stroff().
◆ is_oct()
bool number_format_t::is_oct | ( | ) | const |
Is a octal number?
Definition at line 823 of file hexrays.hpp.
References flags, get_radix(), and opnum.
◆ is_stroff()
bool number_format_t::is_stroff | ( | ) | const |
Is a structure field offset?
- Examples
- hexrays_sample4.cpp.
Definition at line 829 of file hexrays.hpp.
Referenced by is_numop().
◆ needs_to_be_inverted()
bool number_format_t::needs_to_be_inverted | ( | ) | const |
Does the number need to be negated or bitwise negated? Returns true if the user requested a negation but it is not done yet.
Definition at line 834 of file hexrays.hpp.
References NF_BINVDONE, NF_BITNOT, NF_NEGATE, NF_NEGDONE, and props.
Member Data Documentation
◆ flags
flags64_t number_format_t::flags = 0 |
ida flags, which describe number radix, enum, etc
- Examples
- hexrays_sample2.cpp, and hexrays_sample4.cpp.
Definition at line 809 of file hexrays.hpp.
Referenced by get_radix(), is_char(), is_dec(), is_enum(), is_hex(), is_oct(), and is_stroff().
◆ flags32
flags_t number_format_t::flags32 = 0 |
low 32bit of flags (for compatibility)
Definition at line 790 of file hexrays.hpp.
◆ opnum
char number_format_t::opnum |
operand number: 0..UA_MAXOP
Definition at line 791 of file hexrays.hpp.
Referenced by get_radix(), is_char(), is_dec(), is_enum(), is_hex(), is_oct(), and is_stroff().
◆ org_nbytes
char number_format_t::org_nbytes = 0 |
original number size in bytes
Definition at line 806 of file hexrays.hpp.
◆ props
char number_format_t::props = 0 |
properties: combination of NF_ bits (Number format property bits)
- Examples
- hexrays_sample2.cpp, and hexrays_sample4.cpp.
Definition at line 792 of file hexrays.hpp.
Referenced by is_fixed(), and needs_to_be_inverted().
◆ serial
uchar number_format_t::serial = 0 |
for enums: constant serial number
- Examples
- hexrays_sample2.cpp, and hexrays_sample4.cpp.
Definition at line 805 of file hexrays.hpp.
◆ type_name
qstring number_format_t::type_name |
for stroffs: structure for offsetof()
for enums: enum name
- Examples
- hexrays_sample2.cpp, and hexrays_sample4.cpp.
Definition at line 807 of file hexrays.hpp.