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
19 #include "support/types.h"
21 #include <boost/utility.hpp>
30 /// Reads the style files
31 extern void LyXSetStyle();
34 class LyXTextClassList : boost::noncopyable {
37 typedef std::vector<LyXTextClass> ClassList;
39 typedef ClassList::const_iterator const_iterator;
41 const_iterator begin() const { return classlist.begin(); }
43 const_iterator end() const { return classlist.end(); }
45 /// Gets textclass number from name, -1 if textclass name does not exist
46 std::pair<bool, lyx::textclass_type> const
47 NumberOfClass(string const & textclass) const;
50 LyXTextClass const & operator[](lyx::textclass_type textclass) const;
52 /// Read textclass list. Returns false if this fails.
56 mutable ClassList classlist;
58 void Add(LyXTextClass const &);
62 extern LyXTextClassList textclasslist;