16 #ifndef INCLUDE_NN_NLIB_MSGPACK_MPWALKER_H_ 17 #define INCLUDE_NN_NLIB_MSGPACK_MPWALKER_H_ 20 #include "nn/nlib/Swap.h" 22 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 23 #undef NLIB_VIS_PUBLIC 24 #define NLIB_VIS_PUBLIC NLIB_WINEXPORT 38 cur_ =
reinterpret_cast<const uint8_t*
>(p);
49 return operator[](static_cast<size_t>(array_idx));
52 const void*
GetPtr() const NLIB_NOEXCEPT {
return cur_; }
53 size_t GetSize() const NLIB_NOEXCEPT {
return size_; }
75 bool IsOk()
const NLIB_NOEXCEPT {
return cur_ != NULL; }
84 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 85 #undef NLIB_VIS_PUBLIC 86 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 89 #endif // INCLUDE_NN_NLIB_MSGPACK_MPWALKER_H_ #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).
size_t GetSize() const noexcept
Gets the size of the MessagePack data.
MpWalker operator[](int array_idx) const noexcept
The same as operator[](size_t array_idx).
const void * GetPtr() const noexcept
Gets a pointer to the current location of MessagePack data.
#define NLIB_NOEXCEPT
Defines noexcept geared to the environment, or the equivalent.
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.
#define NLIB_FINAL
Defines final if it is available for use. If not, holds an empty string.
~MpWalker() noexcept
Destructor.