00001 /* AbiSource Program Utilities 00002 * Copyright (C) 2001 Tomas Frydrych 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 /* pre-emptive dismissal; ut_types.h is needed by just about everything, 00021 * so even if it's commented out in-file that's still a lot of work for 00022 * the preprocessor to do... 00023 */ 00024 #ifndef UT_TYPES_H 00025 #include "ut_types.h" 00026 #endif 00027 00028 struct encoding_pair 00029 { 00030 const char * adb; 00031 UT_UCSChar ucs; 00032 }; 00033 00034 00035 class ABI_EXPORT UT_AdobeEncoding 00036 { 00037 public: 00038 UT_AdobeEncoding(const encoding_pair *ep, UT_uint32 esize); 00039 00040 UT_UCSChar adobeToUcs(const char * str) const; 00041 const char * ucsToAdobe(const UT_UCSChar c); 00042 private: 00043 char m_buff[12]; 00044 const encoding_pair * m_pLUT; 00045 UT_uint32 m_iLutSize; 00046 };