2
* Copyright (c) 2003 Robert Collins <rbtcollins@hotmail.com>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
20
#ifndef LIBTRIE_TRIECHARTRANSFORM_H
21
#define LIBTRIE_TRIECHARTRANSFORM_H
23
/* This is an internal header for libTrie.
24
* libTrie provides both limited C and full C++
26
* libTrie itself is written in C++.
27
* For C bindings see Trie.h
39
#include <sys/types.h>
43
/* TODO: parameterize this to be more generic -
44
* i.e. M-ary internal node sizes etc
47
class TrieCharTransform
51
virtual ~TrieCharTransform() {}
53
virtual char const operator () (char const) = 0;
56
class TrieCaseless : public TrieCharTransform
58
virtual char const operator () (char const aChar) {return tolower(aChar);}
61
#endif /* __cplusplus */
63
#endif /* LIBTRIE_TRIECHARTRANSFORM_H */