This class holds information about reflected types. Each instance represents one type that is known to the reflection system.
More...
|
| ezRTTI (ezStringView sName, const ezRTTI *pParentType, ezUInt32 uiTypeSize, ezUInt32 uiTypeVersion, ezUInt8 uiVariantType, ezBitflags< ezTypeFlags > flags, ezRTTIAllocator *pAllocator, ezArrayPtr< const ezAbstractProperty * > properties, ezArrayPtr< const ezAbstractFunctionProperty * > functions, ezArrayPtr< const ezPropertyAttribute * > attributes, ezArrayPtr< ezAbstractMessageHandler * > messageHandlers, ezArrayPtr< ezMessageSenderInfo > messageSenders, const ezRTTI *(*fnVerifyParent)()) |
| The constructor requires all the information about the type that this object represents.
|
|
void | VerifyCorrectness () const |
| Can be called in debug builds to check that all reflected objects are correctly set up.
|
|
EZ_ALWAYS_INLINE ezStringView | GetTypeName () const |
| Returns the name of this type.
|
|
EZ_ALWAYS_INLINE ezUInt64 | GetTypeNameHash () const |
| Returns the hash of the name of this type.
|
|
const EZ_ALWAYS_INLINE ezRTTI * | GetParentType () const |
| Returns the type that is the base class of this type. May be nullptr if this type has no base class.
|
|
EZ_ALWAYS_INLINE ezVariantType::Enum | GetVariantType () const |
| Returns the corresponding variant type for this type or Invalid if there is none.
|
|
EZ_ALWAYS_INLINE bool | IsDerivedFrom (const ezRTTI *pBaseType) const |
| Returns true if this type is derived from the given type (or of the same type).
|
|
template<typename BASE > |
EZ_ALWAYS_INLINE bool | IsDerivedFrom () const |
| Returns true if this type is derived from or identical to the given type.
|
|
EZ_ALWAYS_INLINE ezRTTIAllocator * | GetAllocator () const |
| Returns the object through which instances of this type can be allocated.
|
|
EZ_ALWAYS_INLINE ezArrayPtr< const ezAbstractProperty *const > | GetProperties () const |
| Returns the array of properties that this type has. Does NOT include properties from base classes.
|
|
EZ_ALWAYS_INLINE ezArrayPtr< const ezAbstractFunctionProperty *const > | GetFunctions () const |
|
EZ_ALWAYS_INLINE ezArrayPtr< const ezPropertyAttribute *const > | GetAttributes () const |
|
template<typename Type > |
const Type * | GetAttributeByType () const |
| Returns the first attribute that derives from the given type, or nullptr if nothing is found.
|
|
void | GetAllProperties (ezDynamicArray< const ezAbstractProperty * > &out_properties) const |
| Returns the list of properties that this type has, including derived properties from all base classes.
|
|
EZ_ALWAYS_INLINE ezUInt32 | GetTypeSize () const |
| Returns the size (in bytes) of an instance of this type.
|
|
EZ_ALWAYS_INLINE ezUInt32 | GetTypeVersion () const |
| Returns the version number of this type.
|
|
const EZ_ALWAYS_INLINE ezBitflags< ezTypeFlags > & | GetTypeFlags () const |
| Returns the type flags.
|
|
const ezAbstractProperty * | FindPropertyByName (ezStringView sName, bool bSearchBaseTypes=true) const |
| Will iterate over all properties of this type and (optionally) the base types to search for a property with the given name.
|
|
EZ_ALWAYS_INLINE ezStringView | GetPluginName () const |
| Returns the name of the plugin which this type is declared in.
|
|
const EZ_ALWAYS_INLINE ezArrayPtr< ezAbstractMessageHandler * > & | GetMessageHandlers () const |
| Returns the array of message handlers that this type has.
|
|
bool | DispatchMessage (void *pInstance, ezMessage &ref_msg) const |
| Dispatches the given message to the proper message handler, if there is one available. Returns true if so, false if no message handler for this type exists.
|
|
bool | DispatchMessage (const void *pInstance, ezMessage &ref_msg) const |
| Dispatches the given message to the proper message handler, if there is one available. Returns true if so, false if no message handler for this type exists.
|
|
template<typename MessageType > |
EZ_ALWAYS_INLINE bool | CanHandleMessage () const |
| Returns whether this type can handle the given message type.
|
|
bool | CanHandleMessage (ezMessageId id) const |
| Returns whether this type can handle the message type with the given id.
|
|
const EZ_ALWAYS_INLINE ezArrayPtr< ezMessageSenderInfo > & | GetMessageSender () const |
|
This class holds information about reflected types. Each instance represents one type that is known to the reflection system.
Instances of this class are typically created through the macros from the StaticRTTI.h header. Each instance represents one type. This class holds information about derivation hierarchies and exposed properties. You can thus find out whether a type is derived from some base class and what properties of which types are available. Properties can then be read and modified on instances of this type.