1 /* AbiSource Program Utilities 2 * Copyright (C) 2001 Tomas Frydrych 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 2 7 * of the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 * 02110-1301 USA. 18 */ 19 20 /* pre-emptive dismissal; ut_types.h is needed by just about everything, 21 * so even if it's commented out in-file that's still a lot of work for 22 * the preprocessor to do... 23 */ 24 #ifndef UT_TYPES_H 25 #include "ut_types.h" 26 #endif 27 28 struct encoding_pair 29 { 30 const char * adb; 31 UT_UCSChar ucs; 32 }; 33 34 35 class ABI_EXPORT UT_AdobeEncoding 36 { 37 public: 38 UT_AdobeEncoding(const encoding_pair *ep, UT_uint32 esize); 39 40 UT_UCSChar adobeToUcs(const char * str) const; 41 const char * ucsToAdobe(const UT_UCSChar c); 42 private: 43 char m_buff[12]; 44 const encoding_pair * m_pLUT; 45 UT_uint32 m_iLutSize; 46 }; 47