#include <flexbuffers.h>
Definition at line 347 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 977 of file flexbuffers.h.
978{
980
981
982 int (*comp)(
const void *,
const void *) =
nullptr;
983 switch (keys.byte_width_)
984 {
985 case 1:
986 comp = KeyCompare<uint8_t>;
987 break;
988 case 2:
989 comp = KeyCompare<uint16_t>;
990 break;
991 case 4:
992 comp = KeyCompare<uint32_t>;
993 break;
994 case 8:
995 comp = KeyCompare<uint64_t>;
996 break;
997 }
998 auto res = std::bsearch(key, keys.data_, keys.size(), keys.byte_width_, comp);
999 if (!res)
1001 auto i = (reinterpret_cast<uint8_t *>(res) - keys.data_) / keys.byte_width_;
1002 return (*
static_cast<const Vector *
>(
this))[i];
1003}
References Keys(), and flexbuffers::NullPackedType().
◆ operator[]() [2/2]
Reference flexbuffers::Map::operator[] |
( |
const std::string & |
key | ) |
const |
|
inline |
◆ Values()
Vector flexbuffers::Map::Values |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: