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

ie_imp_ISCII.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 #ifndef IE_IMP_ISCII_H
00023 #define IE_IMP_ISCII_H
00024 
00025 #include "ie_imp_Text.h"
00026 
00027 #define ISCII_INV   0xD9    // Invisible character - acts like Unicode ZWJ
00028 #define ISCII_NUKTA 0xE9    // A Nukta following a character can modify its meaning
00029 #define ISCII_ATTR  0xEF    // Attribute - meaning?
00030 #define ISCII_EXT   0xF0    // EXT preceeding a character can modify its meaning
00031 
00032 class PD_Document;
00033 
00034 // ISCII file stream class
00035 
00036 class ImportISCIIStreamFile : public ImportStreamFile
00037 {
00038 public:
00039     ImportISCIIStreamFile(GsfInput *pFile);
00040     ~ImportISCIIStreamFile() {}
00041 protected:
00042     virtual bool getRawChar(UT_UCSChar &b);
00043 private:
00044     unsigned char m_cLookAhead;
00045     bool m_bNeedByte;
00046 };
00047 
00048 // The importer/reader for ISCII files.
00049 
00050 class IE_Imp_ISCII_Sniffer : public IE_ImpSniffer
00051 {
00052     friend class IE_Imp;
00053 
00054 public:
00055     IE_Imp_ISCII_Sniffer(const char * name);
00056     virtual ~IE_Imp_ISCII_Sniffer() {}
00057 
00058     virtual const IE_SuffixConfidence * getSuffixConfidence ();
00059     virtual const IE_MimeConfidence * getMimeConfidence () { return NULL; }
00060     virtual UT_Confidence_t recognizeContents (const char * szBuf,
00061                                     UT_uint32 iNumbytes);
00062     virtual bool getDlgLabels (const char ** szDesc,
00063                                const char ** szSuffixList,
00064                                IEFileType * ft);
00065     virtual UT_Error constructImporter (PD_Document * pDocument,
00066                                         IE_Imp ** ppie);
00067 
00068 };
00069 
00070 class IE_Imp_ISCII : public IE_Imp_Text
00071 {
00072 public:
00073     IE_Imp_ISCII(PD_Document * pDocument);
00074     virtual ~IE_Imp_ISCII() {};
00075 
00076 protected:
00077     virtual UT_Error    _constructStream(ImportStream *& pStream, GsfInput * fp);
00078 };
00079 
00080 #endif /* IE_IMP_ISCII_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1