IDA C++ SDK 9.2
Loading...
Searching...
No Matches
udt_type_data_t Struct Reference

#include <typeinf.hpp>

Inheritance diagram for udt_type_data_t:
udtmembervec_t qvector< udm_t >

Public Member Functions

void swap (udt_type_data_t &r)
 DEFINE_MEMORY_ALLOCATION_FUNCS () bool is_unaligned() const
bool is_msstruct () const
bool is_cppobj () const
bool is_vftable () const
bool is_fixed () const
bool is_tuple () const
void set_vftable (bool on=true)
void set_fixed (bool on=true)
void set_tuple (bool on=true)
bool is_last_baseclass (size_t idx)
udm_tadd_member (const char *_name, const tinfo_t &_type, uint64 _offset=0)
 Add a new member to a structure or union.
ssize_t find_member (udm_t *pattern_udm, int strmem_flags) const
 tinfo_t::find_udm
ssize_t find_member (const char *name) const
ssize_t find_member (uint64 bit_offset) const
ssize_t get_best_fit_member (asize_t disp) const
 Get the member that is most likely referenced by the specified offset.
ssize_t get_best_fit_member (udm_t *out, asize_t disp) const
 Get the member that is most likely referenced by the specified offset.
Public Member Functions inherited from qvector< udm_t >
 qvector (void)
 Constructor.
 ~qvector (void)
 Destructor.
 DEFINE_MEMORY_ALLOCATION_FUNCS () void push_back(const udm_t &x)
 Append a new element to the end the qvector.
void push_back (udm_t &&x)
 Append a new element to the end the qvector with a move semantics.
void emplace_back (Args &&... args)
 Construct and append a new element to the end the qvector with a forwarding semantics.
void pop_back (void)
 Remove the last element in the qvector.
size_t size (void) const
 Get the number of elements in the qvector.
bool empty (void) const
 Does the qvector have 0 elements?
const udm_toperator[] (size_t _idx) const
 Allows use of typical c-style array indexing for qvectors.
const udm_tat (size_t _idx) const
 Get element at index '_idx'.
const udm_tfront (void) const
 Get the first element in the qvector.
const udm_tback (void) const
 Get the last element in the qvector.
void qclear (void)
 Destroy all elements but do not free memory.
void clear (void)
 Destroy all elements and free memory.
qvector< udm_t > & operator= (const qvector< udm_t > &x)
 Allow assignment of one qvector to another using '='.
void resize (size_t _newsize, const udm_t &x)
 Resize to the given size.
void resize_noinit (size_t _newsize)
void grow (const udm_t &x=udm_t())
 Add an element to the end of the qvector, which will be a new T() if x is not given.
size_t capacity (void) const
 Get the number of elements that this qvector can contain - not the same as the number of elements currently in the qvector (size())
void reserve (size_t cnt)
 Increase the capacity of the qvector.
void truncate (void)
 Shrink the capacity down to the current number of elements.
void swap (qvector< udm_t > &r) noexcept
 Replace all attributes of this qvector with that of 'r', and vice versa.
udm_textract (void)
 Empty the qvector and return a pointer to it's contents.
void inject (udm_t *s, size_t len)
 Populate the qvector with dynamic memory.
bool operator== (const qvector< udm_t > &r) const
 Allow ability to test the equality of two qvectors using '=='.
bool operator!= (const qvector< udm_t > &r) const
 Allow ability to test equality of two qvectors using '!='.
iterator begin (void)
 Get an iterator that points to the first element in the qvector.
iterator end (void)
 Get an iterator that points to the end of the qvector (NOT the last element)
iterator insert (iterator it, const udm_t &x)
 Insert an element into the qvector at a specified position.
iterator erase (iterator it)
 Remove an element from the qvector.
iterator find (const udm_t &x)
 Find an element in the qvector.
ssize_t index (const udm_t &x) const
 Find index of the specified value or return -1.
void add (const udm_t &x)
 Add an element to the end of the qvector.
bool has (const udm_t &x) const
 Does the qvector contain x?
bool add_unique (const udm_t &x)
 Add an element to the end of the qvector - only if it isn't already present.
bool del (const udm_t &x)
 Find an element and remove it.
const char * dstr (void) const

Public Attributes

size_t total_size = 0
 total structure size in bytes
size_t unpadded_size = 0
 unpadded structure size in bytes
uint32 effalign = 0
 effective structure alignment (in bytes)
uint32 taudt_bits = 0
 TA... and TAUDT... bits.
uchar version = VERSION
 version of udt_type_data_t
uchar sda = 0
 declared structure alignment (shift amount+1). 0 - unspecified
uchar pack = 0
 #pragma pack() alignment (shift amount)
bool is_union = false
 is union or struct?

Static Public Attributes

static constexpr int VERSION = 1

Additional Inherited Members

Public Types inherited from qvector< udm_t >
typedef udm_t value_type
 the type of objects contained in this qvector
typedef udm_titerator
typedef const udm_tconst_iterator

Member Function Documentation

◆ swap()

void udt_type_data_t::swap ( udt_type_data_t & r)
inline

◆ DEFINE_MEMORY_ALLOCATION_FUNCS()

udt_type_data_t::DEFINE_MEMORY_ALLOCATION_FUNCS ( ) const
inline

◆ is_msstruct()

bool udt_type_data_t::is_msstruct ( ) const
inline

◆ is_cppobj()

bool udt_type_data_t::is_cppobj ( ) const
inline

◆ is_vftable()

bool udt_type_data_t::is_vftable ( ) const
inline

◆ is_fixed()

bool udt_type_data_t::is_fixed ( ) const
inline

◆ is_tuple()

bool udt_type_data_t::is_tuple ( ) const
inline

◆ set_vftable()

void udt_type_data_t::set_vftable ( bool on = true)
inline

◆ set_fixed()

void udt_type_data_t::set_fixed ( bool on = true)
inline

◆ set_tuple()

void udt_type_data_t::set_tuple ( bool on = true)
inline

◆ is_last_baseclass()

bool udt_type_data_t::is_last_baseclass ( size_t idx)
inline

◆ add_member()

udm_t & udt_type_data_t::add_member ( const char * _name,
const tinfo_t & _type,
uint64 _offset = 0 )
inline

Add a new member to a structure or union.

This function just pushes a new member to the back of the structure/union member vector.

Parameters
_nameMember name. Must not be nullptr.
_typeMember type. Must not be empty.
[in]_offsetMember offset in bits. It is the caller's responsibility to specify correct offsets.
Returns
{ Reference to the newly added member }

◆ find_member() [1/3]

ssize_t udt_type_data_t::find_member ( udm_t * pattern_udm,
int strmem_flags ) const
inline

tinfo_t::find_udm

Note
STRMEM_VFTABLE is not supported
Returns
the index of the found member or -1

◆ find_member() [2/3]

ssize_t udt_type_data_t::find_member ( const char * name) const
inline

◆ find_member() [3/3]

ssize_t udt_type_data_t::find_member ( uint64 bit_offset) const
inline

◆ get_best_fit_member() [1/2]

ssize_t udt_type_data_t::get_best_fit_member ( asize_t disp) const
inline

Get the member that is most likely referenced by the specified offset.

Useful for offsets > sizeof(struct).

◆ get_best_fit_member() [2/2]

ssize_t udt_type_data_t::get_best_fit_member ( udm_t * out,
asize_t disp ) const
inline

Get the member that is most likely referenced by the specified offset.

Useful for offsets > sizeof(struct).

Parameters
[out]outudm_t storage. Must not be nullptr
dispthe byte offset

Member Data Documentation

◆ VERSION

int udt_type_data_t::VERSION = 1
staticconstexpr

◆ total_size

size_t udt_type_data_t::total_size = 0

total structure size in bytes

◆ unpadded_size

size_t udt_type_data_t::unpadded_size = 0

unpadded structure size in bytes

◆ effalign

uint32 udt_type_data_t::effalign = 0

effective structure alignment (in bytes)

◆ taudt_bits

uint32 udt_type_data_t::taudt_bits = 0

TA... and TAUDT... bits.

◆ version

uchar udt_type_data_t::version = VERSION

version of udt_type_data_t

◆ sda

uchar udt_type_data_t::sda = 0

declared structure alignment (shift amount+1). 0 - unspecified

◆ pack

uchar udt_type_data_t::pack = 0

#pragma pack() alignment (shift amount)

◆ is_union

bool udt_type_data_t::is_union = false

is union or struct?


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