+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);
+}
+