3 #ifndef INCLUDE_NN_NLIB_MSGPACK_JSONWRITER_H_
4 #define INCLUDE_NN_NLIB_MSGPACK_JSONWRITER_H_
8 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
10 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT
21 OPTION_DEFAULT = 0x00000000,
22 OPTION_RELAXED = 0x00000001
29 errno_t GetErrorValue() const NLIB_NOEXCEPT {
return m_ErrorValue; }
39 return Write(&str[0], n, obj, option);
45 void SetError(
errno_t e) NLIB_NOEXCEPT {
46 if (m_ErrorValue == 0) m_ErrorValue = e;
59 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
60 #undef NLIB_VIS_PUBLIC
61 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT
64 #endif // INCLUDE_NN_NLIB_MSGPACK_JSONWRITER_H_
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
#define NLIB_DISALLOW_COPY_AND_ASSIGN(TypeName)
Prohibits use of the copy constructor and assignment operator for the class specified by TypeName...
#define NLIB_SAFE_BOOL(class_name, exp)
Defines a safe operator bool function in the class. Uses the C++11 explicit bool if it is available f...
~JsonWriter() noexcept
Destructor.
Object created when MessagePack or JSON is read.
bool Write(BinaryWriter *w, T x)
You can write user-defined class objects by specializing this function template.
JsonWriter() noexcept
Instantiates the object with default parameters (default constructor).
JSON generator. Converts an MpObject to JSON and writes it to the stream.
A file that contains the configuration information for each development environment.
Option
Defines the option values that can be passed to Write.
The base class for output streams. This class cannot be instantiated.