retdec
Public Member Functions | Protected Attributes | List of all members
retdec::fileinfo::IterativeSubtitleGetter Class Referenceabstract

#include <iterative_subtitle_getter.h>

Inheritance diagram for retdec::fileinfo::IterativeSubtitleGetter:
Inheritance graph
[legend]
Collaboration diagram for retdec::fileinfo::IterativeSubtitleGetter:
Collaboration graph
[legend]

Public Member Functions

 IterativeSubtitleGetter (FileInformation &fileInfo)
 
Getters
void getHeader (std::string &structsHeader) const
 
void getSubtitle (std::string &subTitle) const
 
Pure virtual methods
virtual bool getFlags (std::size_t structIndex, std::size_t recIndex, std::string &flagsValue, std::vector< std::string > &desc) const =0
 
- Public Member Functions inherited from retdec::fileinfo::IterativeGetter
 IterativeGetter (FileInformation &fileInfo)
 
std::size_t getNumberOfStructures () const
 
std::size_t getNumberOfStoredRecords (std::size_t structIndex) const
 
std::size_t getHeaderElements (std::size_t structIndex, std::vector< std::string > &elements) const
 
void getTitle (std::string &structTitle) const
 
bool hasBasicInfo (std::size_t structIndex) const
 
virtual std::size_t getBasicInfo (std::size_t structIndex, std::vector< std::string > &desc, std::vector< std::string > &info) const =0
 
virtual bool getRecord (std::size_t structIndex, std::size_t recIndex, std::vector< std::string > &record) const =0
 

Protected Attributes

std::string header
 title of presented structures More...
 
std::string subtitle
 subtitle of presented record More...
 
- Protected Attributes inherited from retdec::fileinfo::IterativeGetter
FileInformationfileinfo
 information about file More...
 
std::size_t numberOfStructures
 number of presented structures (e.g. number of symbol tables) More...
 
std::vector< std::size_t > numberOfStoredRecords
 number of records in each structure More...
 
std::vector< std::string > commonHeaderElements
 parts of header (common for all structures) More...
 
std::vector< std::size_t > numberOfExtraElements
 number of extra elements in each structure More...
 
std::vector< std::vector< std::string > > extraHeaderElements
 parts of header (specific for each structure) More...
 
std::string title
 title of presented structure More...
 

Detailed Description

Abstract class for loading information about file.

This class enable iterative queries to a set of items (e.g. queries to symbols from symbol tables).

Constructor & Destructor Documentation

◆ IterativeSubtitleGetter()

retdec::fileinfo::IterativeSubtitleGetter::IterativeSubtitleGetter ( FileInformation fileInfo)

Constructor

Parameters
fileInfoInformation about file

Constructor in subclass must initialize subtitle and other members which are descripted in constructor of superclass. Member header is optional.

Member Function Documentation

◆ getFlags()

bool retdec::fileinfo::IterativeSubtitleGetter::getFlags ( std::size_t  structIndex,
std::size_t  recIndex,
std::string &  flagsValue,
std::vector< std::string > &  desc 
) const
pure virtual

Get value of flags and their descriptions

Parameters
structIndexIndex of selected structure (indexed from 0)
recIndexIndex of record in selected structure (indexed from 0)
flagsValueInto this parameter is stored bit array of flags in string representation
descVector for save descriptors
Returns
true if record was successfully saved, false otherwise

Before loading descriptors, everything from desc is deleted.

If getter does not support flags, flagsValue is erased to zero length.

If structIndex or recIndex is out of range, method returns false.

Implemented in retdec::fileinfo::TypeRefTableJsonGetter, retdec::fileinfo::SymbolTablesJsonGetter, retdec::fileinfo::StringsJsonGetter, retdec::fileinfo::SegmentJsonGetter, retdec::fileinfo::SectionJsonGetter, retdec::fileinfo::RichHeaderJsonGetter, retdec::fileinfo::ResourceJsonGetter, retdec::fileinfo::RelocationTablesJsonGetter, retdec::fileinfo::MissingDepsJsonGetter, retdec::fileinfo::LoaderInfoJsonGetter, retdec::fileinfo::ImportTableJsonGetter, retdec::fileinfo::ExportTableJsonGetter, retdec::fileinfo::DynamicSectionsJsonGetter, retdec::fileinfo::DataDirectoryJsonGetter, and retdec::fileinfo::AnomaliesJsonGetter.

◆ getHeader()

void retdec::fileinfo::IterativeSubtitleGetter::getHeader ( std::string &  structsHeader) const

Get header (title of presented structures)

Parameters
structsHeaderInto this parameter the header is stored

◆ getSubtitle()

void retdec::fileinfo::IterativeSubtitleGetter::getSubtitle ( std::string &  subTitle) const

Get subtitle of presented record

Parameters
subTitleInto this parameter the subtitle is stored

Member Data Documentation

◆ header

std::string retdec::fileinfo::IterativeSubtitleGetter::header
protected

title of presented structures

◆ subtitle

std::string retdec::fileinfo::IterativeSubtitleGetter::subtitle
protected

subtitle of presented record


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