ezEngine Release 26.3
Loading...
Searching...
No Matches
ezAbstractProperty Class Referenceabstract

Base interface for all properties in the reflection system. More...

#include <AbstractProperty.h>

Inheritance diagram for ezAbstractProperty:

Public Member Functions

 ezAbstractProperty (const char *szPropertyName)
 The constructor must get the name of the property. The string must be a compile-time constant.
 
const char * GetPropertyName () const
 Returns the name of the property.
 
virtual const ezRTTIGetSpecificType () const =0
 Returns the type information of the constant property. Use this to cast this property to a specific version of ezTypedConstantProperty.
 
virtual ezPropertyCategory::Enum GetCategory () const =0
 Returns the category of this property. Cast this property to the next higher type for more information.
 
const ezBitflags< ezPropertyFlags > & GetFlags () const
 Returns the flags of the property.
 
ezAbstractPropertyAddFlags (ezBitflags< ezPropertyFlags > flags)
 Adds flags to the property. Returns itself to allow to be called during initialization.
 
ezAbstractPropertyAddAttributes (ezPropertyAttribute *pAttrib1, ezPropertyAttribute *pAttrib2=nullptr, ezPropertyAttribute *pAttrib3=nullptr, ezPropertyAttribute *pAttrib4=nullptr, ezPropertyAttribute *pAttrib5=nullptr, ezPropertyAttribute *pAttrib6=nullptr)
 Adds attributes to the property. Returns itself to allow to be called during initialization. Allocate an attribute using standard 'new'.
 
ezArrayPtr< const ezPropertyAttribute *const > GetAttributes () const
 Returns the array of property attributes.
 
template<typename Type >
const Type * GetAttributeByType () const
 Returns the first attribute that derives from the given type, or nullptr if nothing is found.
 

Protected Attributes

ezBitflags< ezPropertyFlagsm_Flags
 
const char * m_szPropertyName
 
ezHybridArray< const ezPropertyAttribute *, 2, ezStaticsAllocatorWrapperm_Attributes
 

Detailed Description

Base interface for all properties in the reflection system.

Properties represent accessible data members, functions, or virtual data in reflected types. This base class provides the common interface and metadata for property introspection.

Property categories:

  • Constant: Compile-time constant values stored in RTTI data
  • Member: Object data members with getter/setter access
  • Function: Callable methods with parameters and return values
  • Array: Container properties with indexed access
  • Set: Collection properties with unique elements
  • Map: Key-value pair collections

Key features:

  • Property flags for type information (const, reference, pointer, etc.)
  • Attribute system for metadata (UI hints, validation, etc.)
  • Type-safe casting to specific property interfaces
  • Hierarchical property introspection

Usage: Properties are typically registered through reflection macros rather than created manually.

Member Function Documentation

◆ GetCategory()

virtual ezPropertyCategory::Enum ezAbstractProperty::GetCategory ( ) const
pure virtual

Returns the category of this property. Cast this property to the next higher type for more information.

Implemented in ezAbstractConstantProperty, ezAbstractMemberProperty, ezAbstractArrayProperty, ezAbstractSetProperty, ezAbstractMapProperty, and ezAbstractFunctionProperty.

◆ GetSpecificType()


The documentation for this class was generated from the following files: