]> git.lyx.org Git - lyx.git/blobdiff - src/chset.h
Added html export for LinuxDoc and DocBook. LinuxDoc import now available in file...
[lyx.git] / src / chset.h
index 6156606571c566d318bfb354eaa9cad428a8087a..adce167ab17c80b576e6a531bc69d6211d2d46ef 100644 (file)
@@ -1,44 +1,34 @@
 // -*- C++ -*-
-#ifndef _Chset_h_
-#define _Chset_h_
+#ifndef CHSET_H
+#define CHSET_H
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
+#include <map>
+#include <utility>
+
+using std::map;
+using std::pair;
+
 #include "LString.h"
 
 ///
 class CharacterSet {
 public:
        ///
-       CharacterSet();
-       ///
-       ~CharacterSet();
-       
+       bool loadFile(string const &);
        ///
-       bool loadFile(const LString&);
+       string const & getName() const;
        ///
-       LString getName();
-       ///
-       bool encodeString(LString&);
+       pair<bool, int> encodeString(string &) const;
 private:
        ///
-       LString name_;
-       
-       ///
-       struct Cdef {
-               ///
-               unsigned char ic;
-               ///
-               LString str;
-               ///
-               Cdef *next;
-       };
-       
+       string name_;
        ///
-       Cdef *map_;
+       typedef map<string, unsigned char> Cdef;
        ///
-       void freeMap();
+       Cdef map_;
 };
 #endif