4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
12 #ifndef LYXLEX_PIMPL_H
13 #define LYXLEX_PIMPL_H
17 #ifdef USE_COMPRESSION
18 # include <boost/iostreams/filtering_streambuf.hpp>
19 # include <boost/iostreams/filter/gzip.hpp>
20 # include <boost/iostreams/device/file.hpp>
21 namespace io = boost::iostreams;
24 #include <boost/utility.hpp>
32 class LyXLex::Pimpl : boost::noncopyable {
35 Pimpl(keyword_item * tab, int num);
37 std::string const getString() const;
39 void printError(std::string const & message) const;
41 void printTable(std::ostream & os);
43 void pushTable(keyword_item * tab, int num);
47 bool setFile(std::string const & filename);
49 void setStream(std::istream & i);
51 void setCommentChar(char c);
53 bool next(bool esc = false);
55 int search_kw(char const * const tag) const;
63 void pushToken(std::string const &);
64 /// fb_ is only used to open files, the stream is accessed through is.
67 #ifdef USE_COMPRESSION
68 /// gz_ is only used to open files, the stream is accessed through is.
69 io::filtering_istreambuf gz_;
72 /// the stream that we use.
81 std::vector<char> buff;
98 : table_elem(0), table_siz(0) {}
100 pushed_table(keyword_item * ki, int siz)
101 : table_elem(ki), table_siz(siz) {}
103 keyword_item * table_elem;
108 std::stack<pushed_table> pushed;