Scintilla 4.0.3
[TortoiseGit.git] / ext / scintilla / src / CaseFolder.h
blob45917daeee246cb39f4891840050e9cf28a87bef
1 // Scintilla source code edit control
2 /** @file CaseFolder.h
3 ** Classes for case folding.
4 **/
5 // Copyright 1998-2013 by Neil Hodgson <neilh@scintilla.org>
6 // The License.txt file describes the conditions under which this software may be distributed.
8 #ifndef CASEFOLDER_H
9 #define CASEFOLDER_H
11 namespace Scintilla {
13 class CaseFolder {
14 public:
15 virtual ~CaseFolder();
16 virtual size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) = 0;
19 class CaseFolderTable : public CaseFolder {
20 protected:
21 char mapping[256];
22 public:
23 CaseFolderTable();
24 virtual ~CaseFolderTable();
25 size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override;
26 void SetTranslation(char ch, char chTranslation);
27 void StandardASCII();
30 class ICaseConverter;
32 class CaseFolderUnicode : public CaseFolderTable {
33 ICaseConverter *converter;
34 public:
35 CaseFolderUnicode();
36 size_t Fold(char *folded, size_t sizeFolded, const char *mixed, size_t lenMixed) override;
41 #endif