xmake.repo/packages/n/noesis/latest/Include/NsGui/ResourceDictionary.inl

23 lines
697 B
Plaintext
Raw Normal View History

2024-12-22 19:15:02 +08:00
////////////////////////////////////////////////////////////////////////////////////////////////////
// NoesisGUI - http://www.noesisengine.com
// Copyright (c) 2013 Noesis Technologies S.L. All Rights Reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////
#include <NsCore/DynamicCast.h>
namespace Noesis
{
////////////////////////////////////////////////////////////////////////////////////////////////////
template<class T>
inline T* ResourceDictionary::Get(const char* key) const
{
BaseComponent* value = Get(key);
NS_CHECK(value == 0 || DynamicCast<T*>(value) != 0, "Invalid cast");
return static_cast<T*>(value);
}
}