#include <flexbuffers.h>
Definition at line 335 of file flexbuffers.h.
◆ Map()
| flexbuffers::Map::Map |
( |
const uint8_t * |
data, |
|
|
uint8_t |
byte_width |
|
) |
| |
|
inline |
◆ EmptyMap()
| static Map flexbuffers::Map::EmptyMap |
( |
| ) |
|
|
inlinestatic |
◆ IsTheEmptyMap()
| bool flexbuffers::Map::IsTheEmptyMap |
( |
| ) |
const |
|
inline |
◆ Keys()
◆ operator[]() [1/2]
| Reference flexbuffers::Map::operator[] |
( |
const char * |
key | ) |
const |
|
inline |
Definition at line 863 of file flexbuffers.h.
863 {
865
866
867 int (*comp)(
const void *,
const void *) =
nullptr;
868 switch (keys.byte_width_) {
869 case 1: comp = KeyCompare<uint8_t>; break;
870 case 2: comp = KeyCompare<uint16_t>; break;
871 case 4: comp = KeyCompare<uint32_t>; break;
872 case 8: comp = KeyCompare<uint64_t>; break;
874 }
875 auto res = std::bsearch(key, keys.data_, keys.size(), keys.byte_width_, comp);
877 auto i = (reinterpret_cast<uint8_t *>(res) - keys.data_) / keys.byte_width_;
878 return (*
static_cast<const Vector *
>(
this))[i];
879}
#define FLATBUFFERS_ASSERT
References FLATBUFFERS_ASSERT, Keys(), and flexbuffers::NullPackedType().
◆ operator[]() [2/2]
| Reference flexbuffers::Map::operator[] |
( |
const std::string & |
key | ) |
const |
|
inline |
Definition at line 881 of file flexbuffers.h.
881 {
882 return (*this)[key.c_str()];
883}
◆ Values()
| Vector flexbuffers::Map::Values |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: