#include "lyxlex.h"
-#ifdef USE_COMPRESSION
+#include "support/types.h"
+
# include <boost/iostreams/filtering_streambuf.hpp>
# include <boost/iostreams/filter/gzip.hpp>
# include <boost/iostreams/device/file.hpp>
namespace io = boost::iostreams;
-#endif
#include <boost/utility.hpp>
-#include <fstream>
#include <istream>
#include <stack>
#include <vector>
+
+namespace lyx {
+
+namespace support { class FileName; }
+
///
class LyXLex::Pimpl : boost::noncopyable {
public:
///
std::string const getString() const;
///
+ docstring const getDocString() const;
+ ///
void printError(std::string const & message) const;
///
void printTable(std::ostream & os);
///
void popTable();
///
- bool setFile(std::string const & filename);
+ bool setFile(support::FileName const & filename);
///
void setStream(std::istream & i);
///
bool eatLine();
///
bool nextToken();
+ /// test if there is a pushed token or the stream is ok
+ bool inputAvailable();
///
void pushToken(std::string const &);
/// fb_ is only used to open files, the stream is accessed through is.
std::filebuf fb_;
-#ifdef USE_COMPRESSION
/// gz_ is only used to open files, the stream is accessed through is.
io::filtering_istreambuf gz_;
-#endif
/// the stream that we use.
std::istream is;
///
int no_items;
///
- std::vector<char> buff;
+ std::string buff;
///
int status;
///
///
std::stack<pushed_table> pushed;
};
+
+} // namespace lyx
+
#endif