]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtextclass.h
add GuiView parent to QToc for proper memory management.
[lyx.git] / src / lyxtextclass.h
index 45cb28f7e1c72498c7d124c0189b88658e32b383..2936b13d24fc436526b2aacdf1f0d6f6f6fba77a 100644 (file)
 #include <boost/shared_ptr.hpp>
 
 #include <vector>
-
+#include <set>
 
 namespace lyx {
 
+namespace support { class FileName; }
+
 class LyXLex;
 class Counters;
 class FloatList;
@@ -65,7 +67,7 @@ public:
        const_iterator end() const { return layoutlist_.end(); }
 
        /// Performs the read of the layout file.
-       bool read(std::string const & filename, bool merge = false);
+       bool read(support::FileName const & filename, bool merge = false);
        ///
        void readOutputType(LyXLex &);
        ///
@@ -124,21 +126,8 @@ public:
        ///
        docstring const & preamble() const;
 
-       /// Packages that are already loaded by the class
-       enum Provides {
-               ///
-               nothing = 0,
-               ///
-               amsmath = 1,
-               ///
-               makeidx = 2,
-               ///
-               url = 4,
-               ///
-               natbib = 8
-       };
-       ///
-       bool provides(Provides p) const;
+       /// is this feature already provided by the class?
+       bool provides(std::string const & p) const;
 
        ///
        unsigned int columns() const;
@@ -207,7 +196,7 @@ private:
        /// preamble text to support layout styles
        docstring preamble_;
        /// latex packages loaded by document class.
-       Provides provides_;
+       std::set<std::string> provides_;
        ///
        unsigned int columns_;
        ///
@@ -259,14 +248,6 @@ private:
 };
 
 
-/// Merge two different provides flags into one bit field record
-inline
-void operator|=(LyXTextClass::Provides & p1, LyXTextClass::Provides p2)
-{
-       p1 = static_cast<LyXTextClass::Provides>(p1 | p2);
-}
-
-
 /// convert page sides option to text 1 or 2
 std::ostream & operator<<(std::ostream & os, LyXTextClass::PageSides p);