2020-07-15 16:55:09 +00:00
|
|
|
#ifndef WF_TEST_UTIL_JSON_DOC_HPP
|
|
|
|
#define WF_TEST_UTIL_JSON_DOC_HPP
|
|
|
|
|
|
|
|
#include "webfuse/impl/json/doc.h"
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace webfuse_test
|
|
|
|
{
|
|
|
|
|
|
|
|
class JsonDoc
|
|
|
|
{
|
2020-07-18 21:16:18 +00:00
|
|
|
JsonDoc(JsonDoc const&) = delete;
|
|
|
|
JsonDoc& operator=(JsonDoc const&) = delete;
|
2020-07-15 16:55:09 +00:00
|
|
|
public:
|
2020-07-19 08:25:59 +00:00
|
|
|
explicit JsonDoc(std::string const & text);
|
2020-07-18 21:16:18 +00:00
|
|
|
JsonDoc(JsonDoc && other);
|
|
|
|
JsonDoc& operator=(JsonDoc && other);
|
2020-07-15 16:55:09 +00:00
|
|
|
~JsonDoc();
|
|
|
|
wf_json const * root();
|
|
|
|
private:
|
|
|
|
std::string contents;
|
|
|
|
wf_json_doc * doc;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|