]> git.lyx.org Git - lyx.git/blobdiff - src/trans.h
explain why ownsClipbiard() does not work on Windows and OS X
[lyx.git] / src / trans.h
index a233ace5cdb7a9cc6dde7c75c34363adec2c7628..2db65e41c038f4bc09dabda5ee3d1796f49fe249 100644 (file)
@@ -1,20 +1,26 @@
 // -*- C++ -*-
 /**
  * \file trans.h
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author unknown
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef TRANS_H
 #define TRANS_H
 
+#include "trans_decl.h"
+
 #include <map>
 
-#include "tex-accent.h"
-#include "LString.h"
-#include "trans_decl.h"
+
+namespace lyx {
+
 
 class LyXLex;
 
@@ -31,51 +37,54 @@ public:
        ~Trans();
 
        ///
-       int Load(string const & language);
+       int load(std::string const & language);
        ///
-       bool IsDefined() const;
+       bool isDefined() const;
        ///
-       string const & GetName() const;
+       std::string const & getName() const;
        ///
-       string const process(char, TransManager &);
+       docstring const process(char_type, TransManager &);
        ///
        bool isAccentDefined(tex_accent, KmodInfo &) const;
 
 private:
        ///
-       void AddDeadkey(tex_accent, string const &);
+       void addDeadkey(tex_accent, docstring const &);
        ///
-       void FreeKeymap();
+       void freeKeymap();
        ///
-       int Load(LyXLex &);
+       int load(LyXLex &);
        ///
-       string const & Match(unsigned char c);
+       docstring const & match(char_type c);
        ///
-       void InsertException(KmodException & exclist, char c,
-                            string const & data, bool = false,
+       void insertException(KmodException & exclist, char_type c,
+                            docstring const & data, bool = false,
                             tex_accent = TEX_NOACCENT);
        ///
-       void FreeException(KmodException & exclist);
+       void freeException(KmodException & exclist);
 
        ///
-       string name_;
+       std::string name_;
        ///
-       std::map<int, string> keymap_;
+       std::map<char_type, docstring> keymap_;
        ///
-       std::map<int, KmodInfo> kmod_list_;
+       std::map<tex_accent, KmodInfo> kmod_list_;
 };
 
 
 ///
 inline
-string const & Trans::Match(unsigned char c)
+docstring const & Trans::match(char_type c)
 {
-       std::map<int, string>::iterator it = keymap_.find(c);
+       std::map<char_type, docstring>::iterator it = keymap_.find(c);
        if (it != keymap_.end()) {
                return it->second;
        }
-       static string dummy;
+       static docstring dummy;
        return dummy;
 }
 
+
+} // namespace lyx
+
 #endif // TRANS_H