retdec
|
#include <section_json_getter.h>
Public Member Functions | |
SectionJsonGetter (FileInformation &fileInfo) | |
virtual std::size_t | getBasicInfo (std::size_t structIndex, std::vector< std::string > &desc, std::vector< std::string > &info) const override |
virtual bool | getRecord (std::size_t structIndex, std::size_t recIndex, std::vector< std::string > &record) const override |
virtual bool | getFlags (std::size_t structIndex, std::size_t recIndex, std::string &flagsValue, std::vector< std::string > &desc) const override |
![]() | |
IterativeSubtitleGetter (FileInformation &fileInfo) | |
void | getHeader (std::string &structsHeader) const |
void | getSubtitle (std::string &subTitle) const |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
std::string | header |
title of presented structures More... | |
std::string | subtitle |
subtitle of presented record More... | |
![]() | |
FileInformation & | fileinfo |
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... | |
Getter for sections
retdec::fileinfo::SectionJsonGetter::SectionJsonGetter | ( | FileInformation & | fileInfo | ) |
Constructor
fileInfo | Information about file |
|
overridevirtual |
Get basic information about presented structure
structIndex | Index of selected structure (indexed from 0) |
desc | Vector for save descriptions of information |
info | Vector for save information about file |
Before loading information, everything from vectors desc and info is deleted. If structure does not support this feature or structIndex is out of range, method returns 0 and vectors are left unchanged.
Implements retdec::fileinfo::IterativeGetter.
|
overridevirtual |
Get value of flags and their descriptions
structIndex | Index of selected structure (indexed from 0) |
recIndex | Index of record in selected structure (indexed from 0) |
flagsValue | Into this parameter is stored bit array of flags in string representation |
desc | Vector for save descriptors |
true
if record was successfully saved, false
otherwiseBefore 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
.
Implements retdec::fileinfo::IterativeSubtitleGetter.
|
overridevirtual |
Get one record from structure
structIndex | Index of selected structure (indexed from 0) |
recIndex | Index of record in selected structure (indexed from 0) |
record | Vector for save record. At end of vector are stored special additional information, if these information are present. Number and semantics of additional information may be different for every separate structure. |
true
if record was successfully saved, false
otherwiseBefore loading record, everything from vector record is deleted.
If method returns true
, record contains as many elements as vector returned by the method getHeaderElements(structIndex).
If structIndex or recIndex is out of range, method returns false
.
Implements retdec::fileinfo::IterativeGetter.