struct
PropertyInfo
Describes a single reflected field.
- Module
- Reflection
- Header
#include "Reflection/PropertyInfo.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
const char* | name | Display name: "Intensity" |
const char* | serializedName | MDF key: "intensity" |
PropertyType | type | |
uint32_t | offset | 32-bit: a component with more than 64 KB of fields is ordinary (one fixed array member does it), and a truncated offset silently points reflection — serialization, inspector, replication — at the wrong bytes. |
uint32_t | size | sizeof the field |
uint16_t | flags | PropertyFlags bitmask |
float | rangeMin | For numeric sliders/drags (0 = no min) |
float | rangeMax | For numeric sliders/drags (0 = no max) |
float | dragSpeed | Inspector drag speed (0 = default 0.1) |
const char* | tooltip | Optional tooltip (nullptr = none) |
const EnumDescriptor* | enumDesc | For Enum type only (nullptr otherwise) |
const char* | customTypeKey | Looked up in PropertyTypeRegistry when type == Custom, nullptr for built-in types. Default nullptr. |
PropertyType | elementType | Tail members with defaults so every existing positional aggregate init stays valid. type == Array: elementType + arrayOps required, structDesc set when elementType == Struct, elementEnumDesc when Enum. type == Struct: structDesc points at the nested type's descriptor. Default PropertyType::Bool. |
const ArrayOps* | arrayOps | Default nullptr. |
const TypeDescriptor* | structDesc | Default nullptr. |
const EnumDescriptor* | elementEnumDesc | Default nullptr. |
const char* | editCondition | MOWO_EDIT_CONDITION: sibling-property gate ("name" / "!name") the inspector evaluates to grey this row. nullptr = always editable. Default nullptr. |
const char* | category | MOWO_CATEGORY: inspector section this row files under inside its component block, first-appearance ordered. nullptr = the unnamed leading section. Default nullptr. |
const char* | assetType | MOWO_ASSET_TYPE: which AssetType an asset-ref row accepts, as the type's serialized name ("Curve", "Mesh", ...). The inspector filters its picker by this. It lives on the PROPERTY because the alternative — an editor-side table keyed by (component name, field name) — has to be edited every time a field is added, and drifts silently into showing every asset in the project when a name changes. nullptr = unfiltered. Default nullptr. |
const char* | units | MOWO_UNITS: the physical unit the field's STORED number is in ("m", "deg", "rad", "s", "kg", ...). The inspector shows it as a suffix and converts where the stored unit is not the one authors think in — rotation is radians on the wire and degrees in every UI, which every rotation row used to hand-code against a component name. It lives on the PROPERTY because the alternative is an editor-side table keyed by (component, field) that silently goes stale on a rename. nullptr = unitless. Default nullptr. |
PropertyType | keyType | type == Map: the key's type and the ops (the VALUE type is elementType, with structDesc for a struct value). type == Set: setOps, with the element type in elementType. Keys and set elements are the fixed-width and string types (Int, UInt32, UUID, String). Default PropertyType::Bool. |
const MapOps* | mapOps | Default nullptr. |
const SetOps* | setOps | Default nullptr. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | RepNotify (MREPLICATED_USING): fired by the replication apply path when this property's bytes actually change on a receiver. | |
int32_t | ReadEnum | Enum storage follows the declared underlying type, and enum class E : uint8_t is the common form. |
void | WriteEnum |
Function details
void
C++
void (*repNotify)(void* component) = nullptrRepNotify (MREPLICATED_USING): fired by the replication apply path when this property's bytes actually change on a receiver. MHT emits a captureless-lambda thunk over the owning type's member function; nullptr on every other property.
ReadEnum
C++
int32_t ReadEnum(const void* field) constEnum storage follows the declared underlying type, and enum class E : uint8_t is the common form. Reading the field as int32_t runs past it into padding, so the value only matched the descriptor when those bytes happened to be zero — go through size in both directions instead.
WriteEnum
C++
void WriteEnum(void* field, int32_t value) constGenerated from Reflection/PropertyInfo.h via reflection.json · Oct 26, 2026Version 1.0.0