ZRCola normalization prepared

This commit is contained in:
Simon Rozman 2016-02-09 15:09:55 +01:00
parent 7db14e1d20
commit 38639a8716
6 changed files with 93 additions and 0 deletions

View File

@ -24,6 +24,8 @@
<ClCompile Include="..\src\decompose.cpp" />
<ClCompile Include="..\src\decompositions.cpp" />
<ClCompile Include="..\src\mapping.cpp" />
<ClCompile Include="..\src\normalizations.cpp" />
<ClCompile Include="..\src\normalize.cpp" />
<ClCompile Include="..\src\stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
@ -35,6 +37,7 @@
<ClInclude Include="..\include\zrcola\common.h" />
<ClInclude Include="..\include\zrcola\compose.h" />
<ClInclude Include="..\include\zrcola\decompose.h" />
<ClInclude Include="..\include\zrcola\normalize.h" />
<ClInclude Include="..\src\stdafx.h" />
</ItemGroup>
<ItemGroup>

View File

@ -30,6 +30,12 @@
<ClCompile Include="..\src\decompositions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\normalize.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\normalizations.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\src\compositions.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@ -47,6 +53,9 @@
<ClInclude Include="..\include\zrcola\compose.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\include\zrcola\normalize.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\res\libZRCola.rc">

View File

@ -0,0 +1,35 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "common.h"
namespace ZRCola {
///
/// Normalizes a decomposed string
///
/// \param[in] input Input string (UTF-16)
/// \param[in] inputMax Length of the input string in characters. Can be (size_t)-1 if \p input is zero terminated.
/// \param[out] output Output string (UTF-16)
/// \param[out] map The vector of source to destination index mappings (optional)
///
void ZRCOLA_API Normalize(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map = NULL);
};

View File

@ -0,0 +1,20 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdafx.h"

View File

@ -0,0 +1,25 @@
/*
Copyright 2015-2016 Amebis
This file is part of ZRCola.
ZRCola is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ZRCola is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with ZRCola. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdafx.h"
void ZRCOLA_API ZRCola::Normalize(_In_z_count_(inputMax) const wchar_t* input, _In_ size_t inputMax, _Out_ std::wstring &output, _Out_opt_ std::vector<mapping>* map)
{
}

View File

@ -22,6 +22,7 @@
#include "../../../include/zrcola.h"
#include "../include/zrcola/compose.h"
#include "../include/zrcola/decompose.h"
#include "../include/zrcola/normalize.h"
namespace ZRCola {