retdec-cpp
analysis.h
Go to the documentation of this file.
1 
8 #ifndef RETDEC_ANALYSIS_H
9 #define RETDEC_ANALYSIS_H
10 
11 #include <functional>
12 #include <memory>
13 #include <string>
14 
15 #include "retdec/resource.h"
16 
17 namespace retdec {
18 
19 class File;
20 
21 namespace internal {
22 
23 class Connection;
24 class AnalysisImpl;
25 
26 } // namespace internal
27 
31 class Analysis: public Resource {
32 public:
36  enum class OnError {
37  Throw,
38  NoThrow
39  };
40 
41 public:
43  Analysis(const std::string &id,
44  const std::shared_ptr<::retdec::internal::Connection> &conn);
46  virtual ~Analysis() override;
47 
50  void waitUntilFinished(OnError onError = OnError::Throw);
52 
55  std::shared_ptr<File> getOutputAsFile();
56  std::string getOutput();
58 
59 private:
60  internal::AnalysisImpl *impl() noexcept;
61  const internal::AnalysisImpl *impl() const noexcept;
62 };
63 
64 } // namespace retdec
65 
66 #endif
The namespace of the library.
Definition: doxygen.h:8
Representation of an analysis.
Definition: analysis.h:31
OnError
What should the waiting member function do when an analysis fails?
Definition: analysis.h:36
Base class of all resources.
Base class of all resources.
Definition: resource.h:24