![]() |
ezEngine
Release 25.03
|
A coroutine type that stores a custom allocator. More...
#include <ScriptCoroutine.h>
Public Member Functions | |
ezScriptCoroutineRTTI (ezStringView sName, ezUniquePtr< ezRTTIAllocator > &&pAllocator) | |
![]() | |
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 |
![]() | |
ezRefCountingImpl ()=default | |
Constructor. | |
ezRefCountingImpl (const ezRefCountingImpl &rhs) | |
void | operator= (const ezRefCountingImpl &rhs) |
ezInt32 | AddRef () const |
Increments the reference counter. Returns the new reference count. | |
ezInt32 | ReleaseRef () const |
Decrements the reference counter. Returns the new reference count. | |
bool | IsReferenced () const |
Returns true if the reference count is greater than 0, false otherwise. | |
ezInt32 | GetRefCount () const |
Returns the current reference count. | |
Additional Inherited Members | |
![]() | |
using | PredicateFunc = ezDelegate< bool(const ezRTTI *), 48 > |
using | VisitorFunc = ezDelegate< void(const ezRTTI *), 48 > |
![]() | |
static void | VerifyCorrectnessForAllTypes () |
Calls VerifyCorrectness() on all ezRTTI objects. | |
static const ezRTTI * | FindTypeByName (ezStringView sName) |
Searches all ezRTTI instances for the one with the given name, or nullptr if no such type exists. | |
static const ezRTTI * | FindTypeByNameHash (ezUInt64 uiNameHash) |
Searches all ezRTTI instances for the one with the given hashed name, or nullptr if no such type exists. | |
static const ezRTTI * | FindTypeByNameHash32 (ezUInt32 uiNameHash) |
static const ezRTTI * | FindTypeIf (PredicateFunc func) |
Searches all ezRTTI instances for one where the given predicate function returns true. | |
static void | ForEachType (VisitorFunc func, ezBitflags< ForEachOptions > options=ForEachOptions::Default) |
static void | ForEachDerivedType (const ezRTTI *pBaseType, VisitorFunc func, ezBitflags< ForEachOptions > options=ForEachOptions::Default) |
template<typename T > | |
static EZ_ALWAYS_INLINE void | ForEachDerivedType (VisitorFunc func, ezBitflags< ForEachOptions > options=ForEachOptions::Default) |
![]() | |
void | UpdateType (const ezRTTI *pParentType, ezUInt32 uiTypeSize, ezUInt32 uiTypeVersion, ezUInt8 uiVariantType, ezBitflags< ezTypeFlags > flags) |
void | RegisterType () |
void | UnregisterType () |
void | GatherDynamicMessageHandlers () |
void | SetupParentHierarchy () |
![]() | |
ezStringView | m_sPluginName |
ezStringView | m_sTypeName |
ezArrayPtr< const ezAbstractProperty *const > | m_Properties |
ezArrayPtr< const ezAbstractFunctionProperty *const > | m_Functions |
ezArrayPtr< const ezPropertyAttribute *const > | m_Attributes |
const ezRTTI * | m_pParentType = nullptr |
ezRTTIAllocator * | m_pAllocator = nullptr |
ezUInt32 | m_uiTypeSize = 0 |
ezUInt32 | m_uiTypeVersion = 0 |
ezUInt64 | m_uiTypeNameHash = 0 |
ezUInt32 | m_uiTypeIndex = 0 |
ezBitflags< ezTypeFlags > | m_TypeFlags |
ezUInt8 | m_uiVariantType = 0 |
ezUInt16 | m_uiMsgIdOffset = ezSmallInvalidIndex |
const ezRTTI *(* | m_VerifyParent )() |
ezArrayPtr< ezAbstractMessageHandler * > | m_MessageHandlers |
ezSmallArray< ezAbstractMessageHandler *, 1, ezStaticsAllocatorWrapper > | m_DynamicMessageHandlers |
ezArrayPtr< ezMessageSenderInfo > | m_MessageSenders |
ezSmallArray< const ezRTTI *, 7, ezStaticsAllocatorWrapper > | m_ParentHierarchy |
A coroutine type that stores a custom allocator.
The custom allocator allows to pass more data to the created coroutine object than the default allocator. E.g. this is used to pass the visual script graph to a visual script coroutine without the user needing to know that the coroutine is actually implemented in visual script.