First commit
This commit is contained in:
55
src/Nazara/Core/Unicode.cpp
Normal file
55
src/Nazara/Core/Unicode.cpp
Normal file
@@ -0,0 +1,55 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#define NAZARA_UNICODE_CPP
|
||||
|
||||
#include <Nazara/Core/Unicode.hpp>
|
||||
#include <Nazara/Core/Debug.hpp>
|
||||
|
||||
namespace NzUnicode
|
||||
{
|
||||
#if NAZARA_CORE_INCLUDE_UNICODEDATA
|
||||
struct Character
|
||||
{
|
||||
nzUInt16 category; // Le type du caractère
|
||||
nzUInt8 direction; // Le sens de lecure du caractère
|
||||
nzUInt32 lowerCase; // Le caractère correspondant en minuscule
|
||||
nzUInt32 titleCase; // Le caractère correspondant en titre
|
||||
nzUInt32 upperCase; // Le caractère correspondant en majuscule
|
||||
};
|
||||
|
||||
#include <Nazara/Core/UnicodeData.hpp>
|
||||
|
||||
#else // Implémentation bidon
|
||||
|
||||
Category GetCategory(char32_t character)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
|
||||
return Category_NoCategory;
|
||||
}
|
||||
|
||||
Direction GetDirection(char32_t character)
|
||||
{
|
||||
NazaraUnused(character);
|
||||
|
||||
return Direction_Boundary_Neutral;
|
||||
}
|
||||
|
||||
char32_t GetLowercase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
|
||||
char32_t GetTitlecase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
|
||||
char32_t GetUppercase(char32_t character)
|
||||
{
|
||||
return character;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user