/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Tools/Libs/ToolsFoundation/Reflection/ToolsReflectionUtils.h
32 строки
1 KB
Ingrater
Clang-format fixes and update to 18.1.1 (#1234)
10 мар 2024, 15:51
Не верифицирован
10 мар 2024, 15:51
2f16acf
Код
Авторство
О чём код?
#pragma once #include <Foundation/Reflection/ReflectionUtils.h> #include <ToolsFoundation/Reflection/ReflectedType.h> class ezIReflectedTypeAccessor; class ezDocumentObject; class ezAbstractObjectGraph; /// \brief Helper functions for handling reflection related operations. /// /// Also check out ezToolsSerializationUtils for related functionality. class EZ_TOOLSFOUNDATION_DLL ezToolsReflectionUtils { public: /// \brief Returns the type under which the property is stored on the editor side. static ezVariantType::Enum GetStorageType(const ezAbstractProperty* pProperty); /// \brief Returns the default value for the entire property as it is stored on the editor side. static ezVariant GetStorageDefault(const ezAbstractProperty* pProperty); static bool GetFloatFromVariant(const ezVariant& val, double& out_fValue); static bool GetVariantFromFloat(double fValue, ezVariantType::Enum type, ezVariant& out_val); /// \brief Creates a ReflectedTypeDescriptor from an ezRTTI instance that can be serialized and registered at the ezPhantomRttiManager. static void GetReflectedTypeDescriptorFromRtti(const ezRTTI* pRtti, ezReflectedTypeDescriptor& out_desc); // [tested] static void GetMinimalReflectedTypeDescriptorFromRtti(const ezRTTI* pRtti, ezReflectedTypeDescriptor& out_desc); static void GatherObjectTypes(const ezDocumentObject* pObject, ezSet<const ezRTTI*>& inout_types); static bool DependencySortTypeDescriptorArray(ezDynamicArray<ezReflectedTypeDescriptor*>& ref_descriptors); };