• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ut_Encoding.h

Go to the documentation of this file.
00001 /* AbiSource Program Utilities
00002  * Copyright (C) 2001 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 
00021 #ifndef UT_ENCODING_H
00022 #define UT_ENCODING_H
00023 
00024 /* pre-emptive dismissal; ut_types.h is needed by just about everything,
00025  * so even if it's commented out in-file that's still a lot of work for
00026  * the preprocessor to do...
00027  */
00028 #ifndef UT_TYPES_H
00029 #include "ut_types.h"
00030 #endif
00031 
00032 struct enc_entry
00033 {
00034     gchar const ** encs;
00035     const gchar * desc;
00036     UT_uint32  id;
00037 };
00038 
00039 class ABI_EXPORT UT_Encoding
00040 {
00041 public:
00042     UT_Encoding();
00043 
00044     UT_uint32   getCount();
00045     const gchar *   getNthEncoding(UT_uint32 n);
00046     const gchar *   getNthDescription(UT_uint32 n);
00047     const gchar *   getEncodingFromDescription(const gchar * desc);
00048     UT_uint32   getIndxFromEncoding(const gchar * enc);
00049     UT_uint32   getIdFromEncoding(const gchar * enc);
00050 
00051 private:
00052     static bool s_Init;
00053     static UT_uint32    s_iCount;
00054 };
00055 
00056 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1