-
-inline
-Language const * Buffer::getLanguage() const
-{
- return params.language;
-}
-
-
-inline
-bool Buffer::isLyxClean() const
-{
- return lyx_clean;
-}
-
-
-inline
-bool Buffer::isBakClean() const
-{
- return bak_clean;
-}
-
-
-inline
-void Buffer::markLyxClean() const
-{
- if (!lyx_clean) {
- lyx_clean = true;
- updateTitles();
- }
- // if the .lyx file has been saved, we don't need an
- // autosave
- bak_clean = true;
-}
-
-
-inline
-void Buffer::markBakClean()
-{
- bak_clean = true;
-}
-
-
-inline
-void Buffer::setUnnamed(bool flag)
-{
- unnamed = flag;
-}
-
-
-inline
-bool Buffer::isUnnamed()
-{
- return unnamed;
-}
-
-
-inline
-void Buffer::markDirty()
-{
- if (lyx_clean) {
- lyx_clean = false;
- updateTitles();
- }
- bak_clean = false;
- DEPCLEAN * tmp = dep_clean;
- while (tmp) {
- tmp->clean = false;
- tmp = tmp->next;
- }
-}
-
-
-inline
-string const & Buffer::fileName() const
-{
- return filename_;
-}
-
-
-inline
-string const & Buffer::filePath() const
-{
- return filepath_;
-}
-
-
-inline
-bool Buffer::isReadonly() const
-{
- return read_only;
-}
-
-
-inline
-BufferView * Buffer::getUser() const
-{
- return users;
-}
-
-
-inline
-void Buffer::setParentName(string const & name)
-{
- params.parentname = name;
-}
-
-
-///
-inline
-bool operator==(Buffer::TocItem const & a, Buffer::TocItem const & b)
-{
- return a.par == b.par && a.str == b.str;
- // No need to compare depth.
-}
-
-
-///
-inline
-bool operator!=(Buffer::TocItem const & a, Buffer::TocItem const & b)
-{
- return !(a == b);
- // No need to compare depth.
-}
-
-
-///
-inline
-bool operator==(Buffer::inset_iterator const & iter1,
- Buffer::inset_iterator const & iter2)
-{
- return iter1.par == iter2.par
- && (iter1.par == 0 || iter1.it == iter2.it);
-}
-
-
-///
-inline
-bool operator!=(Buffer::inset_iterator const & iter1,
- Buffer::inset_iterator const & iter2)
-{
- return !(iter1 == iter2);
-}
+private:
+ /** Inserts a file into a document
+ \return \c false if method fails.
+ */
+ bool readFile(LyXLex &, std::string const & filename);
+
+ bool do_writeFile(std::ostream & ofs) const;
+
+ /// Use the Pimpl idiom to hide the internals.
+ class Impl;
+ /// The pointer never changes although *pimpl_'s contents may.
+ boost::scoped_ptr<Impl> const pimpl_;
+
+ /// Save the cursor Position on Buffer switch
+ /// this would not be needed if every Buffer would have
+ /// it's BufferView, this should be FIXED in future.
+ StableDocIterator cursor_;
+ StableDocIterator anchor_;
+ /// A cache for the bibfiles (including bibfiles of loaded child
+ /// documents), needed for appropriate update of natbib labels.
+ std::vector<std::string> bibfilesCache_;
+};