retdec-cpp
resource.h
Go to the documentation of this file.
1 
8 #ifndef RETDEC_RESOURCE_H
9 #define RETDEC_RESOURCE_H
10 
11 #include <memory>
12 
13 namespace retdec {
14 
15 namespace internal {
16 
17 class ResourceImpl;
18 
19 } // namespace internal
20 
24 class Resource {
25 public:
27  Resource(std::unique_ptr<internal::ResourceImpl> impl);
29  virtual ~Resource() = 0;
30 
33  std::string getId() const;
34  bool hasFinished();
35  bool hasFinished() const noexcept;
36  bool hasSucceeded();
37  bool hasSucceeded() const noexcept;
38  bool hasFailed();
39  bool hasFailed() const noexcept;
40  std::string getError();
41  std::string getError() const;
43 
46  Resource(const Resource &) = delete;
47  Resource(Resource &&) = delete;
48  Resource &operator=(const Resource &) = delete;
49  Resource &operator=(Resource &&) = delete;
51 
52 protected:
54  std::unique_ptr<internal::ResourceImpl> pimpl;
55 };
56 
57 } // namespace retdec
58 
59 #endif
The namespace of the library.
Definition: doxygen.h:8
std::unique_ptr< internal::ResourceImpl > pimpl
Private implementation.
Definition: resource.h:54
Base class of all resources.
Definition: resource.h:24