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);
55 #ifdef __cpp_rvalue_references 57 return PathValueOp(
"add", path, &value);
62 return PathValueOp(
"replace", path, value);
64 #ifdef __cpp_rvalue_references 66 return PathValueOp(
"replace", path, &value);
71 return PathFromOp(
"move", path, from);
75 return PathFromOp(
"copy", path, from);
78 return PathValueOp(
"test", path, value);
80 #ifdef __cpp_rvalue_references 82 return PathValueOp(
"test", path, &value);
86 #ifdef __cpp_rvalue_references 87 std::pair<errno_t, std::unique_ptr<MpObject> > Export()
NLIB_NOEXCEPT;
112 NLIB_DEFINE_STD_SWAP(::nlib_ns::msgpack::JsonPatchBuilder)
113 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 114 #undef NLIB_VIS_PUBLIC 115 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 118 #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...
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.
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.
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.
errno_t Replace(const nlib_utf8_t *path, MpObject &&value) noexcept
Adds an "replace" operation to the array that serves as the JSON Patch document.
errno_t Replace(const nlib_utf8_t *path, MpObject *value) noexcept
Adds an "replace" 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).