-namespace {
- // helper class, to guarantee this gets reset properly
- class MarkAsExporting {
- public:
- MarkAsExporting(Buffer const * buf) : buf_(buf)
- {
- LASSERT(buf_, /* */);
- buf_->setExportStatus(true);
- }
- ~MarkAsExporting()
- {
- buf_->setExportStatus(false);
- }
- private:
- Buffer const * const buf_;
- };
-}
+// helper class, to guarantee this gets reset properly
+class Buffer::MarkAsExporting {
+public:
+ MarkAsExporting(Buffer const * buf) : buf_(buf)
+ {
+ LASSERT(buf_, /* */);
+ buf_->setExportStatus(true);
+ }
+ ~MarkAsExporting()
+ {
+ buf_->setExportStatus(false);
+ }
+private:
+ Buffer const * const buf_;
+};
+
void Buffer::setExportStatus(bool e) const
void Buffer::setExportStatus(bool e) const
ExportStatus preview(std::string const & format, bool includeall = false) const;
public:
ExportStatus preview(std::string const & format, bool includeall = false) const;
public:
- /// mark the buffer as busy exporting something, or not
- void setExportStatus(bool e) const;
///
bool isExporting() const;
///
bool isExporting() const;
void checkChildBuffers();
private:
void checkChildBuffers();
private:
+ class MarkAsExporting;
+ friend class MarkAsExporting;
+ /// mark the buffer as busy exporting something, or not
+ void setExportStatus(bool e) const;
+
/// Change name of buffer. Updates "read-only" flag.
void setFileName(support::FileName const & fname);
///
/// Change name of buffer. Updates "read-only" flag.
void setFileName(support::FileName const & fname);
///