3 #ifndef INCLUDE_NN_NLIB_MSGPACK_MPWALKER_H_
4 #define INCLUDE_NN_NLIB_MSGPACK_MPWALKER_H_
8 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
10 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT
24 m_Cur =
reinterpret_cast<const uint8_t*
>(p);
35 return operator[](static_cast<size_t>(array_idx));
37 const void* GetRaw(uint32_t* n)
const NLIB_NOEXCEPT
NLIB_NONNULL;
39 const void*
GetPtr() const NLIB_NOEXCEPT {
return m_Cur; }
40 size_t GetSize() const NLIB_NOEXCEPT {
return m_nBytes; }
45 bool IsOk() const NLIB_NOEXCEPT {
return m_Cur != NULL && m_nBytes > 0; }
54 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS)
55 #undef NLIB_VIS_PUBLIC
56 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT
59 #endif // INCLUDE_NN_NLIB_MSGPACK_MPWALKER_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_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...
MpWalker() noexcept
Instantiates the object with default parameters (default constructor).
MpWalker operator[](int array_idx) const noexcept
The same as operator[](size_t array_idx).
A file that contains the configuration information for each development environment.
Quickly accesses MessagePack expanded in memory.
bool Init(const void *p, size_t n) noexcept
Initialize with this function when using the default constructor.
const void * GetPtr() const noexcept
Gets a pointer to the current location of MessagePack data.
~MpWalker() noexcept
Destructor.
size_t GetSize() const noexcept
Gets the size of the MessagePack data.