X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextClass.h;h=07b4f16893f49ce1c934c8d9953526f0bad8f080;hb=0362c6aae73c293d1c20277c12d362acfe0b2ef6;hp=c29011ae1e41df198f5d7b83b1a4ee60c208c44f;hpb=b306e9a2e15664c630e1b462c3db3caf0e9cc9c9;p=lyx.git diff --git a/src/TextClass.h b/src/TextClass.h index c29011ae1e..07b4f16893 100644 --- a/src/TextClass.h +++ b/src/TextClass.h @@ -38,28 +38,11 @@ class FloatList; /// List of inset layouts typedef std::map 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 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; ///