retdec
unpacking_stub.h
Go to the documentation of this file.
1 
7 #ifndef RETDEC_UNPACKER_UNPACKING_STUB_H
8 #define RETDEC_UNPACKER_UNPACKING_STUB_H
9 
10 #include <string>
11 
12 namespace retdec {
13 
14 // Forward declarations
15 namespace loader { class Image; }
16 namespace utils { class DynamicBuffer; }
17 
18 namespace unpacker {
19 
25 {
26 public:
32  UnpackingStub(loader::Image* file) : _file(file) {}
33 
37  virtual ~UnpackingStub() = default;
38 
44  virtual void unpack(const std::string& outputFile) = 0;
45 
49  virtual void cleanup() = 0;
50 
56  loader::Image* getFile() { return _file; }
57 
58 protected:
59  void setFile(loader::Image* file) { _file = file; }
60 
62 };
63 
64 } // namespace unpacker
65 } // namespace retdec
66 
67 #endif
Definition: image.h:22
Definition: unpacking_stub.h:25
loader::Image * getFile()
Definition: unpacking_stub.h:56
void setFile(loader::Image *file)
Definition: unpacking_stub.h:59
loader::Image * _file
Definition: unpacking_stub.h:61
virtual void unpack(const std::string &outputFile)=0
virtual ~UnpackingStub()=default
UnpackingStub(loader::Image *file)
Definition: unpacking_stub.h:32
The class for dynamic buffered data manipulation taking the endianness of the data in account.
Definition: dynamic_buffer.h:36
Generic loader.
Definition: archive_wrapper.h:19
Supportive functionality for the generic unpacker.