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
|
|
|
using std::map;
|
|
|
|
|
|
|
|
#include <utility>
|
|
|
|
using std::pair;
|
|
|
|
using std::make_pair; // may also be put in chset.C
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
#include "LString.h"
|
|
|
|
|
1999-11-15 12:01:38 +00:00
|
|
|
using std::map;
|
|
|
|
|
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
|
|
|
///
|
1999-12-16 06:43:25 +00:00
|
|
|
pair<bool, int> encodeString(string &) 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
|
|
|
///
|
1999-11-15 12:01:38 +00:00
|
|
|
typedef 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
|