retdec
Private Attributes | List of all members
retdec::fileinfo::DynamicSection Class Reference

#include <dynamic_section.h>

Collaboration diagram for retdec::fileinfo::DynamicSection:
Collaboration graph
[legend]

Public Member Functions

Getters
std::size_t getNumberOfStoredEntries () const
 
std::string getNumberOfDeclaredEntriesStr () const
 
std::string getSectionName () const
 
std::string getEntryType (std::size_t position) const
 
std::string getEntryDescription (std::size_t position) const
 
std::string getEntryValueStr (std::size_t position, std::ios_base &(*format)(std::ios_base &)) const
 
unsigned long long getEntryFlagsSize (std::size_t position) const
 
unsigned long long getEntryFlags (std::size_t position) const
 
std::string getEntryFlagsStr (std::size_t position) const
 
std::size_t getNumberOfEntryFlagsDescriptors (std::size_t position) const
 
void getEntryFlagsDescriptors (std::size_t position, std::vector< std::string > &desc, std::vector< std::string > &abb) const
 
Setters
void setNumberOfDeclaredEntries (unsigned long long entries)
 
void setSectionName (std::string sectionName)
 
Other methods
void addEntry (DynamicEntry &entry)
 
void clearEntries ()
 

Private Attributes

unsigned long long declaredEntries = std::numeric_limits<unsigned long long>::max()
 declared number of entries in section More...
 
std::string name
 
std::vector< DynamicEntrytable
 

Detailed Description

Class for dynamic section

Value std::numeric_limits<unsigned long long>::max() mean unspecified value or error for numeric types. Methods with index parameters does not perform control of indexes.

Member Function Documentation

◆ addEntry()

void retdec::fileinfo::DynamicSection::addEntry ( DynamicEntry entry)

Add entry to section

Parameters
entryItem to add

◆ clearEntries()

void retdec::fileinfo::DynamicSection::clearEntries ( )

Delete all entries from section

◆ getEntryDescription()

std::string retdec::fileinfo::DynamicSection::getEntryDescription ( std::size_t  position) const

Get description of selected entry

Parameters
positionIndex of entry in section (0..x)
Returns
Description of selected entry

◆ getEntryFlags()

unsigned long long retdec::fileinfo::DynamicSection::getEntryFlags ( std::size_t  position) const

Get flags of selected entry

Parameters
positionIndex of entry in section (0..x)
Returns
Flags of selected entry in number representation

◆ getEntryFlagsDescriptors()

void retdec::fileinfo::DynamicSection::getEntryFlagsDescriptors ( std::size_t  position,
std::vector< std::string > &  desc,
std::vector< std::string > &  abb 
) const

Get flags descriptors of selected entry

Parameters
positionIndex of entry in section (0..x)
descVector for save descriptors
abbVector for save abbreviations of descriptors

◆ getEntryFlagsSize()

unsigned long long retdec::fileinfo::DynamicSection::getEntryFlagsSize ( std::size_t  position) const

Get number of entry's flags

Parameters
positionIndex of entry in section (0..x)
Returns
Number of flags of selected entry

◆ getEntryFlagsStr()

std::string retdec::fileinfo::DynamicSection::getEntryFlagsStr ( std::size_t  position) const

Get flags of selected entry

Parameters
positionIndex of entry in section (0..x)
Returns
Flags of selected entry in string representation

◆ getEntryType()

std::string retdec::fileinfo::DynamicSection::getEntryType ( std::size_t  position) const

Get type of selected entry

Parameters
positionIndex of entry in section (0..x)
Returns
Type of selected entry

◆ getEntryValueStr()

std::string retdec::fileinfo::DynamicSection::getEntryValueStr ( std::size_t  position,
std::ios_base &(*)(std::ios_base &)  format 
) const

Get value of selected entry

Parameters
positionIndex of entry in section (0..x)
formatFormat of resulting string (e.g. std::dec, std::hex)
Returns
Value of selected entry

◆ getNumberOfDeclaredEntriesStr()

std::string retdec::fileinfo::DynamicSection::getNumberOfDeclaredEntriesStr ( ) const

Get number of entries in section

Returns
Number of entries in section

Returned value indicates the declared number of entries stored in file section. This number may not be as large as result of method getNumberOfStoredEntries().

◆ getNumberOfEntryFlagsDescriptors()

std::size_t retdec::fileinfo::DynamicSection::getNumberOfEntryFlagsDescriptors ( std::size_t  position) const

Get number of flags descriptors of selected entry

Parameters
positionIndex of entry in section (0..x)
Returns
Number of flags descriptors of selected entry

◆ getNumberOfStoredEntries()

std::size_t retdec::fileinfo::DynamicSection::getNumberOfStoredEntries ( ) const

Get number of entries in section

Returns
Number of entries in section

Returned value indicates the number of entries stored in this instance. This number may not be as large as result of method getNumberOfDeclaredEntries().

◆ getSectionName()

std::string retdec::fileinfo::DynamicSection::getSectionName ( ) const

Get name of dynamic section

Returns
Name of dynamic section

◆ setNumberOfDeclaredEntries()

void retdec::fileinfo::DynamicSection::setNumberOfDeclaredEntries ( unsigned long long  entries)

Set declared number of entries in section

Parameters
entriesDeclared number of entries in section

◆ setSectionName()

void retdec::fileinfo::DynamicSection::setSectionName ( std::string  sectionName)

Set name of dynamic section

Parameters
sectionNameName of section

Member Data Documentation

◆ declaredEntries

unsigned long long retdec::fileinfo::DynamicSection::declaredEntries = std::numeric_limits<unsigned long long>::max()
private

declared number of entries in section

◆ name

std::string retdec::fileinfo::DynamicSection::name
private

◆ table

std::vector<DynamicEntry> retdec::fileinfo::DynamicSection::table
private

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