00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef SWLOCALE_H
00024 #define SWLOCALE_H
00025
00026 #include <string>
00027 #include <map>
00028
00029 #include <swconfig.h>
00030 #include <versekey.h>
00031
00032 #include <defs.h>
00033
00034 SWORD_NAMESPACE_START
00035
00036 typedef std::map < std::string, std::string, std::less < std::string > >LookupMap;
00037
00044 class SWDLLEXPORT SWLocale {
00045 LookupMap lookupTable;
00046 SWConfig *localeSource;
00047 char *name;
00048 char *description;
00049 struct abbrev *bookAbbrevs;
00050 char *BMAX;
00051 struct sbook **books;
00052
00053 public:
00054 SWLocale(const char *ifilename);
00055 virtual ~SWLocale();
00056
00061 virtual const char *getName();
00065 virtual const char *getDescription();
00066 virtual const char *translate(const char *text);
00067 virtual void augment(SWLocale &addFrom);
00068 virtual SWLocale & operator +=(SWLocale &addFrom) { augment(addFrom); return *this; }
00069 virtual const struct abbrev *getBookAbbrevs();
00070 virtual void getBooks(char **iBMAX, struct sbook ***ibooks);
00071 };
00072
00073 SWORD_NAMESPACE_END
00074 #endif