retdec-cpp
Public Types | Public Member Functions | List of all members
retdec::Analysis Class Reference

Representation of an analysis. More...

#include <analysis.h>

Inheritance diagram for retdec::Analysis:
retdec::Resource

Public Types

enum  OnError { OnError::Throw, OnError::NoThrow }
 What should the waiting member function do when an analysis fails? More...
 

Public Member Functions

virtual ~Analysis () override
 
Waiting For Analysis To Finish
void waitUntilFinished (OnError onError=OnError::Throw)
 Waits until the analysis is finished. More...
 
Obtaining Outputs
std::shared_ptr< FilegetOutputAsFile ()
 Returns the results of the analysis as a file. More...
 
std::string getOutput ()
 Returns the results of the analysis. More...
 
- Public Member Functions inherited from retdec::Resource
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
 
Resourceoperator= (const Resource &)=delete
 
Resourceoperator= (Resource &&)=delete
 

Additional Inherited Members

- Protected Attributes inherited from retdec::Resource
std::unique_ptr< internal::ResourceImpl > pimpl
 Private implementation. More...
 

Detailed Description

Representation of an analysis.

Member Enumeration Documentation

What should the waiting member function do when an analysis fails?

Enumerator
Throw 

Throw AnalysisError when an analysis fails.

NoThrow 

Do not throw AnalysisError when an analysis fails.

Constructor & Destructor Documentation

retdec::Analysis::~Analysis ( )
overridevirtualdefault

Member Function Documentation

std::string retdec::Analysis::getOutput ( )

Returns the results of the analysis.

This function should be called only after the analysis has finished, i.e. hasFinished() returns true.

May access the API.

std::shared_ptr< File > retdec::Analysis::getOutputAsFile ( )

Returns the results of the analysis as a file.

This function should be called only after the analysis has finished, i.e. hasFinished() returns true.

May access the API.

void retdec::Analysis::waitUntilFinished ( OnError  onError = OnError::Throw)

Waits until the analysis is finished.

Parameters
[in]onErrorShould AnalysisError be thrown when the analysis fails?

May access the API.


The documentation for this class was generated from the following files: