retdec-cpp
|
Representation of a decompilation. More...
#include <decompilation.h>
Public Types | |
enum | OnError { OnError::Throw, OnError::NoThrow } |
What should the waiting member functions do when a decompilation fails? More... | |
using | Callback = std::function< void(const Decompilation &decompilation)> |
Type of a callback for waitUntilFinished(). More... | |
Public Member Functions | |
virtual | ~Decompilation () override |
Querying | |
int | getCompletion () |
Returns the completion status (in percentages, 0-100). More... | |
int | getCompletion () const noexcept |
Returns the completion status (in percentages, 0-100). More... | |
Waiting For Decompilation To Finish | |
void | waitUntilFinished (OnError onError=OnError::Throw) |
Waits until the decompilation is finished. More... | |
void | waitUntilFinished (const Callback &callback, OnError onError=OnError::Throw) |
Waits and reports changes until the decompilation is finished. More... | |
Obtaining Outputs | |
std::shared_ptr< File > | getOutputHllFile () |
Returns the output HLL file (C, Python'). More... | |
std::string | getOutputHll () |
Returns the content of the output HLL file (C, Python'). More... | |
![]() | |
virtual | ~Resource ()=0 |
Destructs the resource. More... | |
std::string | getId () const |
Returns the ID of the resource. More... | |
bool | hasFinished () |
Has the resource finished? More... | |
bool | hasFinished () const noexcept |
Has the resource finished? More... | |
bool | hasSucceeded () |
Has the resource succeeded? More... | |
bool | hasSucceeded () const noexcept |
Has the resource succeeded? More... | |
bool | hasFailed () |
Has the resource failed? More... | |
bool | hasFailed () const noexcept |
Has the resource failed? More... | |
std::string | getError () |
Returns the error message (if any). More... | |
std::string | getError () const |
Returns the error message (if any). More... | |
Resource (const Resource &)=delete | |
Resource (Resource &&)=delete | |
Resource & | operator= (const Resource &)=delete |
Resource & | operator= (Resource &&)=delete |
Additional Inherited Members | |
![]() | |
std::unique_ptr< internal::ResourceImpl > | pimpl |
Private implementation. More... | |
Representation of a decompilation.
using retdec::Decompilation::Callback = std::function<void (const Decompilation &decompilation)> |
Type of a callback for waitUntilFinished().
|
strong |
What should the waiting member functions do when a decompilation fails?
Enumerator | |
---|---|
Throw |
Throw DecompilationError when a decompilation fails. |
NoThrow |
Do not throw DecompilationError when a decompilation fails. |
|
overridevirtualdefault |
int retdec::Decompilation::getCompletion | ( | ) |
Returns the completion status (in percentages, 0-100).
May access the API.
|
noexcept |
Returns the completion status (in percentages, 0-100).
Does not access the API.
std::string retdec::Decompilation::getOutputHll | ( | ) |
Returns the content of the output HLL file (C, Python').
This function should be called only after the decompilation has finished, i.e. hasFinished() returns true
.
May access the API.
std::shared_ptr< File > retdec::Decompilation::getOutputHllFile | ( | ) |
Returns the output HLL file (C, Python').
This function should be called only after the decompilation has finished, i.e. hasFinished() returns true
.
May access the API.
void retdec::Decompilation::waitUntilFinished | ( | OnError | onError = OnError::Throw | ) |
Waits until the decompilation is finished.
[in] | onError | Should DecompilationError be thrown when the decompilation fails? |
May access the API.
void retdec::Decompilation::waitUntilFinished | ( | const Callback & | callback, |
OnError | onError = OnError::Throw |
||
) |
Waits and reports changes until the decompilation is finished.
[in] | callback | Function to be called when the decompilation status changes. |
[in] | onError | Should DecompilationError be thrown when the decompilation fails? |
May access the API.