16 #ifndef INCLUDE_NN_NLIB_MSGPACK_JSONPATCH_H_ 17 #define INCLUDE_NN_NLIB_MSGPACK_JSONPATCH_H_ 22 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 23 #undef NLIB_VIS_PUBLIC 24 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 34 #ifdef __cpp_rvalue_references 35 #ifdef NLIB_CXX11_DEFAULTED_AND_DELETED_FUNCTIONS 41 oplist_ = std::move(rhs.oplist_);
47 : oplist_(rhs.oplist_,
move_tag()) {}
49 oplist_.assign(rhs.oplist_,
move_tag());
53 return PathValueOp(
"add", path, value);
57 return PathValueOp(
"replace", path, value);
61 return PathFromOp(
"move", path, from);
65 return PathFromOp(
"copy", path, from);
68 return PathValueOp(
"test", path, value);
71 #ifdef __cpp_rvalue_references 72 std::pair<errno_t, MpObject> Export() NLIB_NOEXCEPT {
73 std::pair<errno_t, MpObject> rval;
74 rval.first = Export(&rval.second);
80 swap(oplist_, rhs.oplist_);
105 NLIB_DEFINE_STD_SWAP(::nlib_ns::msgpack::JsonPatchBuilder)
106 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 107 #undef NLIB_VIS_PUBLIC 108 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 111 #endif // INCLUDE_NN_NLIB_MSGPACK_JSONPATCH_H_
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
Class to apply JSON Patch (RFC-6902).
Object created when MessagePack or JSON is read.
errno_t Copy(const nlib_utf8_t *path, const nlib_utf8_t *from) noexcept
Adds a "copy" operation to the array that serves as the JSON Patch document.
errno_t Test(const nlib_utf8_t *path, MpObject *value) noexcept
Adds a "test" operation to the array that serves as the JSON Patch document.
An empty structure indicating that an argument to a function needs to be moved.
Object created when MessagePack, JSON, or CSV is read.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
errno_t Add(const nlib_utf8_t *path, MpObject *value) noexcept
Adds an "add" operation to the array that serves as the JSON Patch document.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
errno_t Move(const nlib_utf8_t *path, const nlib_utf8_t *from) noexcept
Adds a "move" operation to the array that serves as the JSON Patch document.
Class to create JSON Patch (RFC-6902).