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 cur_ =
reinterpret_cast<const uint8_t*
>(p);
35 return operator[](static_cast<size_t>(array_idx));
38 const void*
GetPtr() const NLIB_NOEXCEPT {
return cur_; }
39 size_t GetSize() const NLIB_NOEXCEPT {
return size_; }
61 bool IsOk()
const NLIB_NOEXCEPT {
return cur_ != NULL && size_ > 0; }
70 #if defined(_MSC_VER) && defined(nx_msgpack_EXPORTS) 71 #undef NLIB_VIS_PUBLIC 72 #define NLIB_VIS_PUBLIC NLIB_WINIMPORT 75 #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.