11 size_t (*getSize)(
const void*);
12 void* (*getItem)(
const void*, size_t);
13 void (*erase)(
void*,
size_t indexs);
14 void (*emplaceBack)(
void*);
16 template <
typename ItemType>
18 :
TypeDescriptor{
"std::vector<>",
sizeof(std::vector<ItemType>), ReflectionTypeData::Vector },
22 getSize = [](
const void* vecPtr) ->
size_t {
23 const auto& vec = *(
const std::vector<ItemType>*) vecPtr;
27 getItem = [](
const void* vecPtr,
size_t index) ->
void* {
28 auto& vec = *(std::vector<ItemType>*) vecPtr;
29 return (
void*)&vec[index];
32 erase = [](
void* vecPtr,
size_t index) ->
void {
33 auto& vec = *(std::vector<ItemType>*) vecPtr;
34 vec.erase(vec.begin() + index);
37 emplaceBack = [](
void* vecPtr) ->
void {
38 auto& vec = *(std::vector<ItemType>*) vecPtr;
43 virtual const char* GetFullName()
const override {