1999-09-27 18:44:28 +00:00
|
|
|
// -*- C++ -*-
|
1999-10-07 18:44:17 +00:00
|
|
|
#ifndef CHSET_H
|
|
|
|
#define CHSET_H
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
1999-11-15 12:01:38 +00:00
|
|
|
#include <map>
|
1999-12-20 17:38:37 +00:00
|
|
|
#include <utility>
|
2000-02-04 09:38:32 +00:00
|
|
|
|
2000-03-28 02:18:55 +00:00
|
|
|
#include "LString.h"
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
|
|
|
class CharacterSet {
|
|
|
|
public:
|
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
bool loadFile(string const &);
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
string const & getName() const;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-06-01 00:01:17 +00:00
|
|
|
std::pair<bool, int> encodeString(string const &) const;
|
1999-09-27 18:44:28 +00:00
|
|
|
private:
|
|
|
|
///
|
1999-10-02 16:21:10 +00:00
|
|
|
string name_;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
2000-04-04 00:19:15 +00:00
|
|
|
typedef std::map<string, unsigned char> Cdef;
|
1999-09-27 18:44:28 +00:00
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
Cdef map_;
|
1999-09-27 18:44:28 +00:00
|
|
|
};
|
|
|
|
#endif
|