Module pywraps :: Class data_type_t
[frames] | no frames]

Class data_type_t

object --+
         |
        data_type_t

Custom data type definition. All data types should inherit from this class.

Instance Methods
 
__init__(self, name, value_size=0, menu_name=None, hotkey=None, asm_keyword=None, props=0)
Please refer to bytes.hpp / data_type_t in the SDK
 
register(self)
Registers the data type and returns the type id or < 0 on failure
 
unregister(self)
Unregisters the data type and returns True on success
 
may_create_at(self, ea, nbytes)
(optional) If this callback is not defined then this means always may create data type at the given ea.
 
calc_item_size(self, ea, maxsize)
(optional) If this callback is defined it means variable size datatype...

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Instance Variables
  id
Contains the data type id after the data type is registered
Properties

Inherited from object: __class__

Method Details

__init__(self, name, value_size=0, menu_name=None, hotkey=None, asm_keyword=None, props=0)
(Constructor)

 

Please refer to bytes.hpp / data_type_t in the SDK

Overrides: object.__init__

may_create_at(self, ea, nbytes)

 

(optional) If this callback is not defined then this means always may create data type at the given ea.

Parameters:
  • ea - address of the future item
  • nbytes - size of the future item
Returns:
Boolean

calc_item_size(self, ea, maxsize)

 

(optional) If this callback is defined it means variable size datatype
This function is used to determine size of the (possible) item at 'ea'
@param ea: address of the item
@param maxsize: maximal size of the item
@return: integer
    Returns: 0-no such item can be created/displayed
             this callback is required only for varsize datatypes