retdec
iterative_getter.h
Go to the documentation of this file.
1 
7 #ifndef FILEINFO_FILE_PRESENTATION_GETTERS_ITERATIVE_GETTER_ITERATIVE_GETTER_H
8 #define FILEINFO_FILE_PRESENTATION_GETTERS_ITERATIVE_GETTER_ITERATIVE_GETTER_H
9 
11 
12 namespace retdec {
13 namespace fileinfo {
14 
22 {
23  protected:
25  std::size_t numberOfStructures;
26  std::vector<std::size_t> numberOfStoredRecords;
27  std::vector<std::string> commonHeaderElements;
28  std::vector<std::size_t> numberOfExtraElements;
29  std::vector<std::vector<std::string>> extraHeaderElements;
30  std::string title;
31  public:
33 
36  std::size_t getNumberOfStructures() const;
37  std::size_t getNumberOfStoredRecords(std::size_t structIndex) const;
38  std::size_t getHeaderElements(std::size_t structIndex, std::vector<std::string> &elements) const;
39  void getTitle(std::string &structTitle) const;
41 
44  bool hasBasicInfo(std::size_t structIndex) const;
46 
49  virtual std::size_t getBasicInfo(std::size_t structIndex, std::vector<std::string> &desc, std::vector<std::string> &info) const = 0;
50  virtual bool getRecord(std::size_t structIndex, std::size_t recIndex, std::vector<std::string> &record) const = 0;
52 };
53 
54 } // namespace fileinfo
55 } // namespace retdec
56 
57 #endif
Definition: file_information.h:25
Definition: iterative_getter.h:22
std::size_t getNumberOfStructures() const
Definition: iterative_getter.cpp:36
virtual std::size_t getBasicInfo(std::size_t structIndex, std::vector< std::string > &desc, std::vector< std::string > &info) const =0
std::size_t numberOfStructures
number of presented structures (e.g. number of symbol tables)
Definition: iterative_getter.h:25
bool hasBasicInfo(std::size_t structIndex) const
Definition: iterative_getter.cpp:96
std::vector< std::string > commonHeaderElements
parts of header (common for all structures)
Definition: iterative_getter.h:27
std::size_t getHeaderElements(std::size_t structIndex, std::vector< std::string > &elements) const
Definition: iterative_getter.cpp:67
std::size_t getNumberOfStoredRecords(std::size_t structIndex) const
Definition: iterative_getter.cpp:50
std::string title
title of presented structure
Definition: iterative_getter.h:30
IterativeGetter(FileInformation &fileInfo)
Definition: iterative_getter.cpp:27
virtual bool getRecord(std::size_t structIndex, std::size_t recIndex, std::vector< std::string > &record) const =0
std::vector< std::vector< std::string > > extraHeaderElements
parts of header (specific for each structure)
Definition: iterative_getter.h:29
FileInformation & fileinfo
information about file
Definition: iterative_getter.h:24
std::vector< std::size_t > numberOfExtraElements
number of extra elements in each structure
Definition: iterative_getter.h:28
void getTitle(std::string &structTitle) const
Definition: iterative_getter.cpp:86
std::vector< std::size_t > numberOfStoredRecords
number of records in each structure
Definition: iterative_getter.h:26
Definition of FileInformation class.
Definition: archive_wrapper.h:19