X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ftrans.h;h=4463a316138484090b524deb65c3d278d6386083;hb=e94889a041628203c50b66b9a4add63210de6928;hp=8cb068d90f575367d5bdf5f3592f00631df303fc;hpb=c80187fbfcefa7972bd9602a2205521aca236349;p=lyx.git diff --git a/src/trans.h b/src/trans.h index 8cb068d90f..4463a31613 100644 --- a/src/trans.h +++ b/src/trans.h @@ -1,25 +1,31 @@ // -*- C++ -*- -#ifndef Trans_h -#define Trans_h +/** + * \file trans.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \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 -#ifdef __GNUG__ -#pragma interface -#endif +#include "trans_decl.h" #include -#include "tex-accent.h" -#include "LString.h" -#include "trans_decl.h" class LyXLex; class TransManager; /** - Trans: holds a .kmap file + Trans: holds a .kmap file */ -//class Trans : public TransInterface { class Trans { public: /// @@ -28,36 +34,36 @@ 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 &); + std::string const process(char, TransManager &); /// bool isAccentDefined(tex_accent, KmodInfo &) const; - + private: /// - void AddDeadkey(tex_accent, string const &); + void addDeadkey(tex_accent, std::string const &); /// - void FreeKeymap(); + void freeKeymap(); /// - int Load(LyXLex &); + int load(LyXLex &); /// - string const & Match(unsigned char c); + std::string const & match(unsigned char c); /// - void InsertException(KmodException & exclist, char c, - string const & data, bool = false, + void insertException(KmodException & exclist, char c, + std::string const & data, bool = false, tex_accent = TEX_NOACCENT); /// - void FreeException(KmodException & exclist); + void freeException(KmodException & exclist); /// - string name_; + std::string name_; /// - std::map keymap_; + std::map keymap_; /// std::map kmod_list_; }; @@ -65,14 +71,14 @@ private: /// inline -string const & Trans::Match(unsigned char c) +std::string const & Trans::match(unsigned char c) { - std::map::iterator it = keymap_.find(c); + std::map::iterator it = keymap_.find(c); if (it != keymap_.end()) { return it->second; } - static string dummy; + static std::string dummy; return dummy; } -#endif +#endif // TRANS_H