cpp-console-game/eRPC/Response.hpp
ethanglide ed64fb05b1 Remove unnecessary constructor
Using cool smart pointers too wowie!
2024-07-05 15:45:59 -04:00

37 lines
626 B
C++

#ifndef ERPC_RESPONSE_HPP
#define ERPC_RESPONSE_HPP
#include <string>
namespace eRPC
{
class Response
{
public:
/**
* Construct a response with the given message ID, status, and result.
*/
Response(int msgid, bool ok, std::string result);
/**
* Construct a response by parsing the given message.
*/
Response(std::string msg);
/**
* Serialize the response to a string.
*/
std::string serialize();
int getMsgid();
bool isOk();
std::string getResult();
private:
int msgid;
bool ok;
std::string result;
};
}
#endif // ERPC_RESPONSE_HPP