ArrayOps
Type-erased std::vector access for PropertyType::Array fields. The generated .refl.cpp knows the element type and points the property at TArrayOpsFor<Elem>::Get(); serializer/inspector walk elements through these without compile-time knowledge of Elem.
- Module
- Reflection
- Header
#include "Reflection/PropertyInfo.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
size_t | ||
void | ||
void | ||
size_t | sizeof(Elem). | |
void | The structural edits an inspector performs on a list. | |
void | ||
void |
Function details
size_t
size_t (*size)(const void* arr)void
void (*resize)(void* arr, size_t n)void
void (*removeAt)(void* arr, size_t index)size_t
size_t (*elemSize)()sizeof(Elem). PropertyInfo carries the ELEMENT TYPE but no element size, and the type does not pin one (an enum's width follows its underlying type), so the replicator reads the stride from here rather than guessing it. Null on a hand-written ops table that predates this.
void
void (*insertAt)(void* arr, size_t index)The structural edits an inspector performs on a list. resize + at is not enough to build them: shifting elements to open a hole, or copying one, would have to move raw bytes, and a vector element is not relocatable that way the moment it owns storage — std::string and a nested std::vector both self-destruct under a memcpy relocation, and both are shipped element types. Null on a hand-written ops table that predates this, so a caller must check before offering the control.
void
void (*duplicateAt)(void* arr, size_t index)void
void (*swapAt)(void* arr, size_t a, size_t b)