]> git.lyx.org Git - lyx.git/blobdiff - src/TextClass.h
Andre's s/getTextClass/textClass/ cleanup.
[lyx.git] / src / TextClass.h
index c29011ae1e41df198f5d7b83b1a4ee60c208c44f..07b4f16893f49ce1c934c8d9953526f0bad8f080 100644 (file)
@@ -38,28 +38,11 @@ class FloatList;
 /// List of inset layouts
 typedef std::map<docstring, InsetLayout> InsetLayouts;
 
-/// Index in globel text class list. Basically a 'strong typedef'/
-class TextClassIndex
-{
-public:
-       ///
-       TextClassIndex(size_t t) : data_(t) {}
-       ///
-       operator size_t() const { return data_; }
-private:
-       ///
-       size_t data_;
-};
-
-
-
 /// Stores the layout specification of a LyX document class.
 class TextClass {
 public:
        /// The individual styles comprising the document class
        typedef std::vector<LayoutPtr> LayoutList;
-       /// Enumerate the paragraph styles.
-       typedef LayoutList::const_iterator const_iterator;
        /// Construct a layout with default values. Actual values loaded later.
        explicit
        TextClass(std::string const & = std::string(),
@@ -70,12 +53,12 @@ public:
        /// check whether the TeX class is available
        bool isTeXClassAvailable() const;
 
-       /// paragraph styles begin iterator.
-       const_iterator begin() const { return layoutlist_.begin(); }
-       /// paragraph styles end iterator
-       const_iterator end() const { return layoutlist_.end(); }
+       /// Enumerate the paragraph styles.
+       size_t layoutCount() const { return layoutlist_.size(); }
+       /// Access the paragraph styles.
+       LayoutPtr const & layout(size_t index) const { return layoutlist_[index]; }
 
-       ///Enum used with TextClass::read
+       /// Enum used with TextClass::read
        enum ReadType { 
                BASECLASS, //>This is a base class, i.e., top-level layout file
                MERGE, //>This is a file included in a layout file
@@ -116,9 +99,9 @@ public:
        /// The Counters present in this document class.
        Counters & counters() const;
        /// Inset layouts of this doc class
-       InsetLayouts & insetlayouts() const { return insetlayoutlist_; };
+       InsetLayouts & insetLayouts() const { return insetlayoutlist_; };
        ///
-       InsetLayout const & insetlayout(docstring const & name) const;
+       InsetLayout const & insetLayout(docstring const & name) const;
        ///
        docstring const & defaultLayoutName() const;
        ///