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 # include <boost/iostreams/filtering_streambuf.hpp>
18 # include <boost/iostreams/filter/gzip.hpp>
19 # include <boost/iostreams/device/file.hpp>
20 namespace io = boost::iostreams;
22 #include <boost/utility.hpp>
30 class LyXLex::Pimpl : boost::noncopyable {
33 Pimpl(keyword_item * tab, int num);
35 std::string const getString() const;
37 void printError(std::string const & message) const;
39 void printTable(std::ostream & os);
41 void pushTable(keyword_item * tab, int num);
45 bool setFile(std::string const & filename);
47 void setStream(std::istream & i);
49 void setCommentChar(char c);
51 bool next(bool esc = false);
53 int search_kw(char const * const tag) const;
61 void pushToken(std::string const &);
62 /// fb_ is only used to open files, the stream is accessed through is.
65 /// gz_ is only used to open files, the stream is accessed through is.
66 io::filtering_istreambuf gz_;
68 /// the stream that we use.
77 std::vector<char> buff;
94 : table_elem(0), table_siz(0) {}
96 pushed_table(keyword_item * ki, int siz)
97 : table_elem(ki), table_siz(siz) {}
99 keyword_item * table_elem;
104 std::stack<pushed_table> pushed;