2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
12 #ifndef LYXTEXTCLASSLIST_H
13 #define LYXTEXTCLASSLIST_H
15 #include "support/types.h"
17 #include <boost/utility.hpp>
26 /// Reads the style files
27 extern void LyXSetStyle();
30 class LyXTextClassList : boost::noncopyable {
33 typedef std::vector<LyXTextClass> ClassList;
35 typedef ClassList::const_iterator const_iterator;
37 const_iterator begin() const { return classlist_.begin(); }
39 const_iterator end() const { return classlist_.end(); }
41 /// Gets textclass number from name, -1 if textclass name does not exist
42 std::pair<bool, lyx::textclass_type> const
43 NumberOfClass(string const & textclass) const;
46 LyXTextClass const & operator[](lyx::textclass_type textclass) const;
48 /// Read textclass list. Returns false if this fails.
52 mutable ClassList classlist_;
56 extern LyXTextClassList textclasslist;