Switch from Nz prefix to namespace Nz

What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
Lynix
2015-09-25 19:20:05 +02:00
parent c214251ecf
commit df8da275c4
609 changed files with 68265 additions and 66534 deletions

View File

@@ -5,54 +5,57 @@
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/Debug.hpp>
template<typename Type>
NzObjectRef<Type> NzObjectLibrary<Type>::Get(const NzString& name)
namespace Nz
{
NzObjectRef<Type> ref = Query(name);
if (!ref)
NazaraError("Object \"" + name + "\" is not present");
template<typename Type>
ObjectRef<Type> ObjectLibrary<Type>::Get(const String& name)
{
ObjectRef<Type> ref = Query(name);
if (!ref)
NazaraError("Object \"" + name + "\" is not present");
return ref;
}
return ref;
}
template<typename Type>
bool NzObjectLibrary<Type>::Has(const NzString& name)
{
return Type::s_library.find(name) != Type::s_library.end();
}
template<typename Type>
bool ObjectLibrary<Type>::Has(const String& name)
{
return Type::s_library.find(name) != Type::s_library.end();
}
template<typename Type>
void NzObjectLibrary<Type>::Register(const NzString& name, NzObjectRef<Type> object)
{
Type::s_library.emplace(name, object);
}
template<typename Type>
void ObjectLibrary<Type>::Register(const String& name, ObjectRef<Type> object)
{
Type::s_library.emplace(name, object);
}
template<typename Type>
NzObjectRef<Type> NzObjectLibrary<Type>::Query(const NzString& name)
{
auto it = Type::s_library.find(name);
if (it != Type::s_library.end())
return it->second;
else
return nullptr;
}
template<typename Type>
ObjectRef<Type> ObjectLibrary<Type>::Query(const String& name)
{
auto it = Type::s_library.find(name);
if (it != Type::s_library.end())
return it->second;
else
return nullptr;
}
template<typename Type>
void NzObjectLibrary<Type>::Unregister(const NzString& name)
{
Type::s_library.erase(name);
}
template<typename Type>
void ObjectLibrary<Type>::Unregister(const String& name)
{
Type::s_library.erase(name);
}
template<typename Type>
bool NzObjectLibrary<Type>::Initialize()
{
return true; // Que faire
}
template<typename Type>
bool ObjectLibrary<Type>::Initialize()
{
return true; // Que faire
}
template<typename Type>
void NzObjectLibrary<Type>::Uninitialize()
{
Type::s_library.clear();
template<typename Type>
void ObjectLibrary<Type>::Uninitialize()
{
Type::s_library.clear();
}
}
#include <Nazara/Core/DebugOff.hpp>