23 lines
697 B
Plaintext
23 lines
697 B
Plaintext
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
|
// 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);
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|