1 // Copyright (c) 1994 James Clark, 2000 Matthias Clasen
2 // See the file COPYING for copying permission.
4 #ifndef SubstTable_INCLUDED
5 #define SubstTable_INCLUDED
12 namespace SP_NAMESPACE {
15 class SP_API SubstTable {
18 void addSubst(Char from, Char to);
19 void subst(Char &) const;
20 void subst(StringC &) const;
21 Char operator[](Char from) const;
23 Char at(Char from) const;
24 StringC inverse(Char to) const;
25 void inverseTable(SubstTable &) const;
28 Pair(Char f, Char t) : from(f), to(t) {}
34 mutable Vector<Pair> map_;
35 mutable bool isSorted_;
39 void SubstTable::subst(StringC &str) const
41 for (size_t i = 0; i < str.size(); i++)
46 Char SubstTable::operator[](Char t) const
55 void SubstTable::subst(Char &c) const
64 #endif /* SubstTable_INCLUDED */