SDK  2.1.4 [async]
CloudBackend Software Development Kit - SDK API for C++
RemoveDelegate.h
1 #ifndef CBE__delegate__object__RemoveDelegate_h__
2 #define CBE__delegate__object__RemoveDelegate_h__
3 
4 #include "cbe/QueryResult.h"
5 #include "cbe/Types.h"
6 
7 #include "cbe/delegate/Error.h"
8 
9 #include "cbe/util/Context.h"
10 #include "cbe/util/ErrorInfo.h"
11 #include "cbe/util/Exception.h"
12 
13 #include <memory>
14 
15 namespace cbe {
16  namespace delegate {
17  namespace object {
18 class RemoveSuccess;
26 public:
27  using Success = RemoveSuccess;
33  virtual void onRemoveSuccess(cbe::ItemId objectId,
34  std::string name) = 0;
35 
36  using Error = delegate::Error;
40  virtual void onRemoveError(Error&& error, cbe::util::Context&& context) = 0;
41 
46  using Base::Base; // Inherit base class' constructors
47  }; // struct ErrorInfo
48 
49 #ifndef CBE_NO_SYNC
55  struct Exception : cbe::util::ExceptionImpl<ErrorInfo> {
56  using Base::Base; // Inherit base class' constructors
57  }; // class struct CloudBackend::RemoveException
58 #endif // #ifndef CBE_NO_SYNC
59 
60  virtual ~RemoveDelegate();
61 }; // class RemoveDelegate
68 using RemoveDelegatePtr = std::shared_ptr<RemoveDelegate>;
69 
76 public:
77  cbe::ItemId objectId{};
78  std::string name{};
79 
80  RemoveSuccess();
82  RemoveSuccess(cbe::ItemId objectId, std::string name);
83 
89  explicit operator bool() const;
90 }; // class RemoveSuccess
91 
92  } // namespace object
93  } // namespace delegate
94 } // namespace cbe
95 
96 #endif // !CBE__delegate__object__RemoveDelegate_h__
Definition: Error.h:14
Definition: RemoveDelegate.h:25
virtual void onRemoveError(Error &&error, cbe::util::Context &&context)=0
virtual void onRemoveSuccess(cbe::ItemId objectId, std::string name)=0
Convenience type that bundles all parameters passed to method cbe::delegate::object::onRemoveSuccess.
Definition: RemoveDelegate.h:75
std::shared_ptr< RemoveDelegate > RemoveDelegatePtr
Definition: RemoveDelegate.h:68
Root namespace for the CloudBackend SDK API.
Definition: Account.h:22
std::uint64_t ItemId
Id of a cbe::Container or cbe::Object.
Definition: Types.h:88
DefaultCtor
Default constructor marker.
Definition: Types.h:204
Definition: Context.h:11
Definition: ErrorInfo.h:27
Definition: Exception.h:38