Update to dms control phase1.
This commit is contained in:
33
src/recon/RequestResult.h
Normal file
33
src/recon/RequestResult.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef __REQUESTRESULT_H__
|
||||
#define __REQUESTRESULT_H__
|
||||
#include <string>
|
||||
class RequestResult
|
||||
{
|
||||
public:
|
||||
static RequestResult Success(const std::string& aMessage= std::string());
|
||||
static RequestResult Fail(const std::string& aMessage);
|
||||
|
||||
RequestResult()=default;
|
||||
RequestResult(RequestResult &&) = default;
|
||||
RequestResult(const RequestResult &) = default;
|
||||
RequestResult &operator=(RequestResult &&) = default;
|
||||
RequestResult &operator=(const RequestResult &) = default;
|
||||
~RequestResult()=default;
|
||||
|
||||
bool good();
|
||||
bool bad();
|
||||
std::string message();
|
||||
std::string error();
|
||||
|
||||
private:
|
||||
|
||||
std::string mMessage;
|
||||
std::string mError;
|
||||
bool mSuccess;
|
||||
void becomeGood(const std::string& aMessage );
|
||||
void becomeBad(const std::string& aMessage);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // __REQUESTRESULT_H__
|
||||
Reference in New Issue
Block a user