+LyXLex::operator void const *() const
+{
+ // This behaviour is NOT the same as the std::streams which would
+ // use fail() here. However, our implementation of getString() et al.
+ // can cause the eof() and fail() bits to be set, even though we
+ // haven't tried to read 'em.
+ return pimpl_->is.bad() ? 0 : this;
+}
+
+
+bool LyXLex::operator!() const
+{
+ return pimpl_->is.bad();
+}
+
+
+LyXLex & LyXLex::operator>>(std::string & s)
+{
+ if (isOK()) {
+ next();
+ s = getString();
+ }
+ return *this;
+}
+
+
+LyXLex & LyXLex::operator>>(docstring & s)
+{
+ if (isOK()) {
+ next();
+ s = getDocString();
+ }
+ return *this;
+}
+
+
+LyXLex & LyXLex::operator>>(double & s)
+{
+ if (isOK()) {
+ next();
+ s = getFloat();
+ }
+ return *this;
+}
+