]> git.lyx.org Git - lyx.git/blob - src/Toc.h
82f7ce170191a6d56275169fbf78d7bae145d8dd
[lyx.git] / src / Toc.h
1 // -*- C++ -*-
2 /**
3  * \file Toc.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jean-Marc Lasgouttes
8  * \author Angus Leeming
9  * \author Abdelrazak Younes
10  * \author Guillaume Munch
11  *
12  * Full author contact details are available in file CREDITS.
13  */
14
15 #ifndef TOC_H
16 #define TOC_H
17
18 #include "support/shared_ptr.h"
19
20 #include <map>
21 #include <vector>
22 #include <string>
23
24
25 namespace lyx {
26
27 // TocItem is defined in TocBackend.h
28 class TocItem;
29
30 typedef std::vector<TocItem> Toc;
31
32 class TocList : public std::map<std::string, shared_ptr<Toc> >
33 {
34 private:
35         // TocList should never map to null pointers.
36         // We forbid the following method which creates null pointers.
37         using std::map<std::string, shared_ptr<Toc> >::operator[];
38 };
39
40
41 } // namespace lyx
42
43 #endif // TOC_H