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

Information about a data format. More...

#include <bytes.hpp>

Public Member Functions

bool is_present_in_menus () const
 Should this format be shown in UI menus. More...
 

Public Attributes

int32 cbsize
 size of this structure
 
void * ud
 user-defined data to be passed to callbacks
 
int props
 properties (currently 0)
 
const char * name
 Format name, must be unique.
 
const char * menu_name
 Visible format name to use in menus if nullptr, no menu item will be created.
 
const char * hotkey
 Hotkey for the corresponding menu item if nullptr, no hotkey will be associated with the menu item.
 
asize_t value_size
 size of the value in bytes 0 means any size is ok data formats that are registered for standard types (dtid 0) may be called with any value_size (instruction operands only)
 
int32 text_width
 Usual width of the text representation This value is used to calculate the width of the control to display values of this type.
 
bool(idaapi * print )(void *ud, qstring *out, const void *value, asize_t size, ea_t current_ea, int operand_num, int dtid)
 Convert to colored string. More...
 
bool(idaapi * scan )(void *ud, bytevec_t *value, const char *input, ea_t current_ea, int operand_num, qstring *errstr)
 Convert from uncolored string. More...
 
void(idaapi * analyze )(void *ud, ea_t current_ea, int operand_num)
 Analyze custom data format occurrence This callback can be used to create xrefs from the current item. More...
 

Detailed Description

Information about a data format.

Member Function Documentation

◆ is_present_in_menus()

bool data_format_t::is_present_in_menus ( ) const
inline

Should this format be shown in UI menus.

Returns
success

Member Data Documentation

◆ print

bool(idaapi * data_format_t::print) (void *ud, qstring *out, const void *value, asize_t size, ea_t current_ea, int operand_num, int dtid)

Convert to colored string.

Parameters
uduser-defined data
outoutput buffer. may be nullptr
valuevalue to print. may not be nullptr
sizesize of value in 8-bit bytes
current_eacurrent address (BADADDR if unknown)
operand_numcurrent operand number
dtidcustom data type id (0-standard built-in data type)
Returns
success

◆ scan

bool(idaapi * data_format_t::scan) (void *ud, bytevec_t *value, const char *input, ea_t current_ea, int operand_num, qstring *errstr)

Convert from uncolored string.

Parameters
uduser-defined data
valueoutput buffer. may be nullptr
inputinput string. may not be nullptr
current_eacurrent address (BADADDR if unknown)
operand_numcurrent operand number (-1 if unknown)
errstrbuffer for error message
Returns
success

◆ analyze

void(idaapi * data_format_t::analyze) (void *ud, ea_t current_ea, int operand_num)

Analyze custom data format occurrence This callback can be used to create xrefs from the current item.

This callback may be missing.

Parameters
uduser-defined data
current_eacurrent address (BADADDR if unknown)
operand_numcurrent operand number

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