]> git.lyx.org Git - lyx.git/blob - src/lyxtextclasslist.h
fix reading the author field.
[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 <string>
20 #include <vector>
21
22 class LyXTextClass;
23 class LyXLayout;
24
25 /// Reads the style files
26 extern void LyXSetStyle();
27
28 ///
29 class LyXTextClassList : boost::noncopyable {
30 public:
31         ///
32         typedef std::vector<LyXTextClass> ClassList;
33         ///
34         typedef ClassList::const_iterator const_iterator;
35         ///
36         const_iterator begin() const { return classlist_.begin(); }
37         ///
38         const_iterator end() const { return classlist_.end(); }
39
40         /// Gets textclass number from name, -1 if textclass name does not exist
41         std::pair<bool, lyx::textclass_type> const
42         NumberOfClass(std::string const & textclass) const;
43
44         ///
45         LyXTextClass const & operator[](lyx::textclass_type textclass) const;
46
47         /// Read textclass list.  Returns false if this fails.
48         bool Read();
49 private:
50         ///
51         mutable ClassList classlist_;
52 };
53
54 ///
55 extern LyXTextClassList textclasslist;
56
57 #endif