Material throbber: use in tabstrip
[chromium-blink-merge.git] / third_party / hunspell_new / src / hunspell / filemgr.hxx
blobf92f09d8d01b715bec90cd87489271161f1829b2
1 /* file manager class - read lines of files [filename] OR [filename.hz] */
2 #ifndef _FILEMGR_HXX_
3 #define _FILEMGR_HXX_
5 #include "hunvisapi.h"
7 #include "hunzip.hxx"
8 #include <stdio.h>
10 #ifdef HUNSPELL_CHROME_CLIENT
11 namespace hunspell {
12 class LineIterator;
13 } // namespace hunspell
15 // A class which encapsulates operations of reading a BDICT file.
16 // Chrome uses a BDICT file to compress hunspell dictionaries. A BDICT file is
17 // a binary file converted from a DIC file and an AFF file. (See
18 // "bdict_reader.h" for its format.)
19 // This class encapsulates the operations of reading a BDICT file and emulates
20 // the original FileMgr operations for AffixMgr so that it can read a BDICT
21 // file without so many changes.
22 class FileMgr {
23 public:
24 FileMgr(hunspell::LineIterator* iterator);
25 ~FileMgr();
26 char* getline();
27 int getlinenum();
29 protected:
30 hunspell::LineIterator* iterator_;
31 char line_[BUFSIZE + 50]; // input buffer
33 #else
34 class LIBHUNSPELL_DLL_EXPORTED FileMgr
36 protected:
37 FILE * fin;
38 Hunzip * hin;
39 char in[BUFSIZE + 50]; // input buffer
40 int fail(const char * err, const char * par);
41 int linenum;
43 public:
44 FileMgr(const char * filename, const char * key = NULL);
45 ~FileMgr();
46 char * getline();
47 int getlinenum();
49 #endif
50 #endif