105 lines
1.8 KiB
C++
105 lines
1.8 KiB
C++
/**
|
|
* @author
|
|
*/
|
|
|
|
#ifndef CM_INCLUDE_RTSERRRESULT_H_
|
|
#define CM_INCLUDE_RTSERRRESULT_H_
|
|
|
|
|
|
//#include <RTSResult.h>
|
|
#include <string>
|
|
#include <list>
|
|
#include <boost/python/dict.hpp>
|
|
|
|
//#include <boost/python/module.hpp>
|
|
// #include <boost/python/def.hpp>
|
|
//#include <boost/python/class.hpp>
|
|
// #include <boost/ref.hpp>
|
|
// #include <boost/python/ptr.hpp>
|
|
// #include <boost/python/return_value_policy.hpp>
|
|
// #include <boost/python/reference_existing_object.hpp>
|
|
// #include <boost/python/call.hpp>
|
|
// #include <boost/python/object.hpp>
|
|
//#define BOOST_ENABLE_ASSERT_HANDLER
|
|
//#include <boost/assert.hpp>
|
|
|
|
//using namespace boost::python;
|
|
|
|
|
|
|
|
struct RTSResult {
|
|
public:
|
|
RTSResult() : mResCode("")
|
|
{}
|
|
|
|
|
|
void setResCode(const std::string& resCode)
|
|
{
|
|
mResCode = resCode;
|
|
}
|
|
|
|
|
|
std::string getResCode()
|
|
{
|
|
return mResCode;
|
|
}
|
|
|
|
// boost::python::dict const& getProps()
|
|
// {
|
|
// return mProps;
|
|
// }
|
|
|
|
void setMsg(const std::string& newmsg)
|
|
{
|
|
msg = newmsg;
|
|
}
|
|
|
|
|
|
std::string getMsg()
|
|
{
|
|
return msg;
|
|
}
|
|
|
|
|
|
private:
|
|
std::string mResCode;
|
|
//boost::python::dict mProps;
|
|
std::string msg;
|
|
};
|
|
|
|
|
|
class RTSErrResult
|
|
{
|
|
|
|
private:
|
|
std::string mResCode;
|
|
std::list<std::string> msgs;
|
|
public:
|
|
|
|
RTSErrResult();
|
|
RTSErrResult(std::string rescode);
|
|
~RTSErrResult();
|
|
|
|
void setResCode(std::string resCode);
|
|
void format(const std::string fmt_str, ...);
|
|
|
|
RTSResult* getResult();
|
|
|
|
};
|
|
|
|
// class RTSErrResult : public RTSResult
|
|
// {
|
|
// private:
|
|
// /* data */
|
|
// std::string resCode;
|
|
|
|
// public:
|
|
|
|
// RTSErrResult(std::string rescode);
|
|
// ~RTSErrResult();
|
|
|
|
// void format(const std::string fmt_str, ...);
|
|
|
|
// };
|
|
|
|
#endif /* CM_INCLUDE_RTSERRRESULT_H_ */ |