/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
Code/Tools/Libs/ToolsFoundation/Object/Implementation/ObjectAccessorBase_inl.h
39 строк
1 KB
Jan Krassnigg
Small cleanup of ezStatus (#1595)
04 июл 2025, 08:50
Не верифицирован
04 июл 2025, 08:50
416c7ad
Код
Авторство
О чём код?
#include <Foundation/Logging/Log.h> template <typename T> T ezObjectAccessorBase::Get(const ezDocumentObject* pObject, const ezAbstractProperty* pProp, ezVariant index /*= ezVariant()*/) { ezVariant value; ezStatus res = GetValue(pObject, pProp, value, index); if (res.Failed()) ezLog::Error("GetValue failed: {0}", res.GetMessageString()); return value.ConvertTo<T>(); } template <typename T> T ezObjectAccessorBase::GetByName(const ezDocumentObject* pObject, ezStringView sProp, ezVariant index /*= ezVariant()*/) { ezVariant value; ezStatus res = GetValueByName(pObject, sProp, value, index); if (res.Failed()) ezLog::Error("GetValue failed: {0}", res.GetMessageString()); return value.ConvertTo<T>(); } inline ezInt32 ezObjectAccessorBase::GetCount(const ezDocumentObject* pObject, const ezAbstractProperty* pProp) { ezInt32 iCount = 0; ezStatus res = GetCount(pObject, pProp, iCount); if (res.Failed()) ezLog::Error("GetCount failed: {0}", res.GetMessageString()); return iCount; } inline ezInt32 ezObjectAccessorBase::GetCountByName(const ezDocumentObject* pObject, ezStringView sProp) { ezInt32 iCount = 0; ezStatus res = GetCountByName(pObject, sProp, iCount); if (res.Failed()) ezLog::Error("GetCount failed: {0}", res.GetMessageString()); return iCount; }