8 #ifndef RETDEC_DECOMPILATION_H
9 #define RETDEC_DECOMPILATION_H
31 using Callback = std::function<void (const Decompilation &decompilation)>;
45 const std::shared_ptr<::retdec::internal::Connection> &conn);
51 std::string
getId()
const;
55 bool hasSucceeded() const noexcept;
57 bool hasFailed() const noexcept;
59 int getCompletion() const noexcept;
61 std::
string getError() const;
88 std::unique_ptr<Impl> impl;
Representation of a decompilation.
Definition: decompilation.h:28
The namespace of the library.
Definition: doxygen.h:8
Do not throw DecompilationError when a decompilation fails.
bool hasFinished()
Has the decompilation finished?
Definition: decompilation.cpp:146
Decompilation(const Decompilation &)=delete
bool hasSucceeded()
Has the decompilation succeeded?
Definition: decompilation.cpp:168
Throw DecompilationError when a decompilation fails.
std::function< void(const Decompilation &decompilation)> Callback
Type of a callback for waitUntilFinished().
Definition: decompilation.h:31
void waitUntilFinished(OnError onError=OnError::Throw)
Waits until the decompilation is finished.
Definition: decompilation.cpp:262
bool hasFailed()
Has the decompilation failed?
Definition: decompilation.cpp:193
int getCompletion()
Returns the completion status (in percentages, 0-100).
Definition: decompilation.cpp:215
OnError
What should the waiting member functions do when a decompilation fails?
Definition: decompilation.h:37
std::string getId() const
Returns the ID of the decompilation.
Definition: decompilation.cpp:137
std::shared_ptr< File > getOutputHllFile()
Returns the output HLL file (C, Python').
Definition: decompilation.cpp:302
std::string getOutputHll()
Returns the content of the output HLL file (C, Python').
Definition: decompilation.cpp:317
std::string getError()
Returns the error message (if any).
Definition: decompilation.cpp:237
~Decompilation()
Destructs the decompilation.
Base class and factory for files.
Definition: file.h:19