]> git.lyx.org Git - lyx.git/blobdiff - src/chset.h
prepare for 1.1.6pre2
[lyx.git] / src / chset.h
index 17f08193fe7dcf4318fe25e8437eeab5dee62f6a..90d9affad48156848b3a92da9195fa17f87d0373 100644 (file)
@@ -6,39 +6,26 @@
 #pragma interface
 #endif
 
+#include <map>
+#include <utility>
+
 #include "LString.h"
 
 ///
 class CharacterSet {
 public:
        ///
-       CharacterSet();
-       ///
-       ~CharacterSet();
-       
+       bool loadFile(string const &);
        ///
-       bool loadFile(const string&);
+       string const & getName() const;
        ///
-       string getName();
-       ///
-       bool encodeString(string&);
+       std::pair<bool, int> const encodeString(string const &) const;
 private:
        ///
        string name_;
-       
-       ///
-       struct Cdef {
-               ///
-               unsigned char ic;
-               ///
-               string str;
-               ///
-               Cdef *next;
-       };
-       
        ///
-       Cdef *map_;
+       typedef std::map<string, unsigned char> Cdef;
        ///
-       void freeMap();
+       Cdef map_;
 };
 #endif