3 * \file lyxtextclasslist.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
12 #ifndef LYXTEXTCLASSLIST_H
13 #define LYXTEXTCLASSLIST_H
15 #include "lyxtextclass.h"
17 #include "support/types.h"
19 #include <boost/utility.hpp>
29 /// Reads the style files
30 extern bool LyXSetStyle();
33 class LyXTextClassList : boost::noncopyable {
36 typedef std::vector<LyXTextClass> ClassList;
38 typedef ClassList::const_iterator const_iterator;
40 const_iterator begin() const { return classlist_.begin(); }
42 const_iterator end() const { return classlist_.end(); }
44 /// Gets textclass number from name, -1 if textclass name does not exist
45 std::pair<bool, textclass_type> const
46 numberOfClass(std::string const & textclass) const;
49 LyXTextClass const & operator[](textclass_type textclass) const;
51 /// Read textclass list. Returns false if this fails.
54 /// add a textclass from user local directory.
55 /// Return ture/false, and textclass number
56 std::pair<bool, textclass_type> const
57 addTextClass(std::string const & textclass, std::string const & path);
61 mutable ClassList classlist_;
65 extern LyXTextClassList textclasslist;