FMPropertyValueOps
What the kind alone cannot say about an MPROPERTY field: whether its BYTES are its whole value, and — for a std::vector field — how to walk and resize it without naming the element type. Both answers come from the C++ compiler at codegen time and cannot be recovered from the type's spelling, which is why they travel with the property row.
- Module
- Core
- Header
#include "Core/MObject.h"- Namespace
Mowo
triviallyCopyable is the same line MREPLICATED draws: a Struct or Custom field whose bytes hide a heap pointer must not be copied verbatim into storage that outlives the object, so a consumer that stores raw bytes checks this first. It does NOT promise the bytes are meaningful in another process or after the referent dies — a POD struct holding a raw pointer passes the trait and still restores a stale address; mark those MOWO_RUNTIME_ONLY.
Properties
| Type | Name | Description |
|---|---|---|
bool | triviallyCopyable | Default false. |
uint32_t | elementSize | Default 0. |
bool | elementTriviallyCopyable | Default false. |
bool | elementIsPointer | A vector of pointers is a reference LIST, not data: copying its bytes preserves addresses that a hot reload or a save/load has already invalidated, so consumers resolve the elements by identity instead. Default false. |
uint32_t | keySize | Default 0. |
bool | keyTriviallyCopyable | Default false. |
bool | keyIsPointer | A map keyed by an object is a reference container too; a set's element is its key, so for a set this and elementIsPointer agree. Default false. |
Public functions
| Returns | Name | Description |
|---|---|---|
size_t | Null on every non-vector field. | |
void | ||
size_t | Null on every field that is not a map or a set. | |
void | ||
void | ||
void |
Function details
size_t
size_t (*arraySize)(const void* field) = nullptrNull on every non-vector field.
void
void (*arrayResize)(void* field, size_t count) = nullptrsize_t
size_t (*containerSize)(const void* field) = nullptrNull on every field that is not a map or a set. For a map, elementSize and elementTriviallyCopyable describe the mapped value; a set has no value, so visit receives null for it and fill writes only the key. containerAdd default-constructs a key (and value), lets fill write them, then inserts — replacing an entry already under that key.
void
void (*containerClear)(void* field) = nullptrvoid
void (*containerForEach)(const void* field, void* ctx, void (*visit)(void* ctx, const void* key, const void* value)) = nullptrvoid
void (*containerAdd)(void* field, void* ctx, void (*fill)(void* ctx, void* key, void* value)) = nullptr