llresmgr.h

Go to the documentation of this file.
00001 
00033 #ifndef LL_LLRESMGR_H
00034 #define LL_LLRESMGR_H
00035 
00036 #include "locale.h"
00037 #include "stdtypes.h"
00038 #include "llstring.h"
00039 #include "llmemory.h"
00040 
00041 enum LLLOCALE_ID
00042 {
00043         LLLOCALE_USA,
00044         LLLOCALE_UK,
00045         LLLOCALE_COUNT  // Number of values in this enum.  Keep at end.
00046 };
00047 
00048 enum LLFONT_ID
00049 {
00050         LLFONT_OCRA,
00051         LLFONT_SANSSERIF,
00052         LLFONT_SANSSERIF_SMALL,
00053         LLFONT_SANSSERIF_BIG,
00054         LLFONT_SMALL,
00055         LLFONT_COUNT    // Number of values in this enum.  Keep at end.
00056 };
00057 
00058 class LLFontGL;
00059 
00060 class LLResMgr : public LLSingleton<LLResMgr>
00061 {
00062 public:
00063         LLResMgr();
00064 
00065         void                            setLocale( LLLOCALE_ID locale_id );
00066         LLLOCALE_ID                     getLocale() const                                               { return mLocale; }
00067 
00068         char                            getDecimalPoint() const;
00069         char                            getThousandsSeparator() const;
00070 
00071         char                            getMonetaryDecimalPoint() const;        
00072         char                            getMonetaryThousandsSeparator() const;
00073         std::string                     getMonetaryString( S32 input ) const;
00074         void                            getIntegerString( LLString& output, S32 input ) const;
00075 
00076 //      const char*                     getRes( LLSTR_ID string_id ) const              { return mStrings[ string_id ]; }
00077         const LLFontGL*         getRes( LLFONT_ID font_id ) const               { return mFonts[ font_id ]; }
00078         const LLFontGL*         getRes( LLString font_id ) const;
00079 
00080 private:
00081         LLLOCALE_ID                     mLocale;
00082 //      const char**            mStrings;
00083         const LLFontGL**        mFonts;
00084 
00085 //      const char*                     mUSAStrings[LLSTR_COUNT];
00086         const LLFontGL*         mUSAFonts[LLFONT_COUNT];
00087 
00088 //      const char*                     mUKStrings[LLSTR_COUNT];
00089         const LLFontGL*         mUKFonts[LLFONT_COUNT];
00090 };
00091 
00092 class LLLocale
00093 {
00094 public:
00095         LLLocale(const LLString& locale_string);
00096         virtual ~LLLocale();
00097 
00098         static const LLString USER_LOCALE;
00099         static const LLString SYSTEM_LOCALE;
00100 
00101 private:
00102         LLString        mPrevLocaleString;
00103 };
00104 
00105 #endif  // LL_RESMGR_

Generated on Fri May 16 08:32:56 2008 for SecondLife by  doxygen 1.5.5