]> git.lyx.org Git - lyx.git/blob - src/lyxtextclasslist.h
Qt compilation fixes.
[lyx.git] / src / lyxtextclasslist.h
1 // -*- C++ -*-
2 /**
3  * \file lyxtextclasslist.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef LYXTEXTCLASSLIST_H
13 #define LYXTEXTCLASSLIST_H
14
15 #include "support/types.h"
16
17 #include <boost/utility.hpp>
18
19 #include <vector>
20
21 class LyXTextClass;
22 class LyXLayout;
23
24 /// Reads the style files
25 extern void LyXSetStyle();
26
27 ///
28 class LyXTextClassList : boost::noncopyable {
29 public:
30         ///
31         typedef std::vector<LyXTextClass> ClassList;
32         ///
33         typedef ClassList::const_iterator const_iterator;
34         ///
35         const_iterator begin() const { return classlist_.begin(); }
36         ///
37         const_iterator end() const { return classlist_.end(); }
38
39         /// Gets textclass number from name, -1 if textclass name does not exist
40         std::pair<bool, lyx::textclass_type> const
41         NumberOfClass(std::string const & textclass) const;
42
43         ///
44         LyXTextClass const & operator[](lyx::textclass_type textclass) const;
45
46         /// Read textclass list.  Returns false if this fails.
47         bool Read();
48 private:
49         ///
50         mutable ClassList classlist_;
51 };
52
53 ///
54 extern LyXTextClassList textclasslist;
55
56 #endif