retdec
Private Types | Private Attributes | List of all members
retdec::fileformat::DynamicTable Class Reference

#include <dynamic_table.h>

Collaboration diagram for retdec::fileformat::DynamicTable:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfRecords () const
 
const DynamicEntrygetRecord (std::size_t recordIndex) const
 
const DynamicEntrygetRecordOfType (unsigned long long recordType) const
 
const std::string & getSectionName () const
 
Iterators
dynamicTableIterator begin () const
 
dynamicTableIterator end () const
 
Other methods
void clear ()
 
void addRecord (DynamicEntry &record)
 
bool hasRecords () const
 
bool hasRecordOfType (unsigned long long recordType) const
 
void setSectionName (const std::string &name)
 
void dump (std::string &dumpTable) const
 

Private Types

using dynamicTableIterator = std::vector< DynamicEntry >::const_iterator
 

Private Attributes

std::vector< DynamicEntrytable
 
std::string sectionName
 Name of the section this table was created from. More...
 

Detailed Description

Dynamic table

Member Typedef Documentation

◆ dynamicTableIterator

using retdec::fileformat::DynamicTable::dynamicTableIterator = std::vector<DynamicEntry>::const_iterator
private

Member Function Documentation

◆ addRecord()

void retdec::fileformat::DynamicTable::addRecord ( DynamicEntry record)

Add new record

Parameters
recordRecord which will be added

◆ begin()

DynamicTable::dynamicTableIterator retdec::fileformat::DynamicTable::begin ( ) const

Get begin of records

Returns
Begin of dynamic table records

◆ clear()

void retdec::fileformat::DynamicTable::clear ( )

Delete all records from table

◆ dump()

void retdec::fileformat::DynamicTable::dump ( std::string &  dumpTable) const

Dump information about dynamic table

Parameters
dumpTableInto this parameter is stored dump of dynamic table in an LLVM style

◆ end()

DynamicTable::dynamicTableIterator retdec::fileformat::DynamicTable::end ( ) const

Get end of records

Returns
End of dynamic table records

◆ getNumberOfRecords()

std::size_t retdec::fileformat::DynamicTable::getNumberOfRecords ( ) const

Get number of records in table

Returns
Number of records in table

◆ getRecord()

const DynamicEntry * retdec::fileformat::DynamicTable::getRecord ( std::size_t  recordIndex) const

Get record from table

Parameters
recordIndexIndex of record in table (indexed from 0)
Returns
Pointer to selected record or nullptr if index of record is incorrect

◆ getRecordOfType()

const DynamicEntry * retdec::fileformat::DynamicTable::getRecordOfType ( unsigned long long  recordType) const

Get record of specified type from table

Parameters
recordTypeRequired type of record
Returns
Pointer to first record from table which have type equal to recordType, or nullptr if such record does not exist

◆ getSectionName()

const std::string & retdec::fileformat::DynamicTable::getSectionName ( ) const

Get name of the section/segment this dynamic table was created from.

Returns
Section/segment name.

◆ hasRecordOfType()

bool retdec::fileformat::DynamicTable::hasRecordOfType ( unsigned long long  recordType) const

Check if record with type recordType is present in table

Parameters
recordTypeType of record
Returns
true if has record with type recordType, false otherwise

◆ hasRecords()

bool retdec::fileformat::DynamicTable::hasRecords ( ) const

Find out if there are any records

Returns
true if there are some records, false otherwise

◆ setSectionName()

void retdec::fileformat::DynamicTable::setSectionName ( const std::string &  name)

Set name of the section/segment this table was created from.

Parameters
nameSection/segment name.

Member Data Documentation

◆ sectionName

std::string retdec::fileformat::DynamicTable::sectionName
private

Name of the section this table was created from.

◆ table

std::vector<DynamicEntry> retdec::fileformat::DynamicTable::table
private

all records in table


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