Consider the case where there is not any layout name.
[lyx.git] / src / InsetList.h
blob33a9fe1e7f27e338240ebe1f919447d58fed090a
1 // -*- C++ -*-
2 /**
3 * \file InsetList.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 INSET_LIST_H
13 #define INSET_LIST_H
15 #include "support/types.h"
17 #include <vector>
19 class InsetBase;
20 class Buffer;
23 ///
24 class InsetList {
25 public:
26 ///
27 class InsetTable {
28 public:
29 ///
30 InsetTable(lyx::pos_type p, InsetBase * i) : pos(p), inset(i) {}
31 ///
32 lyx::pos_type pos;
33 ///
34 InsetBase * inset;
36 ///
37 typedef std::vector<InsetTable> List;
38 ///
39 typedef List::iterator iterator;
40 ///
41 typedef List::const_iterator const_iterator;
43 ///
44 ~InsetList();
45 ///
46 iterator begin() { return list_.begin(); }
47 ///
48 iterator end() { return list_.end(); }
49 ///
50 const_iterator begin() const { return list_.begin(); }
51 ///
52 const_iterator end() const { return list_.end(); }
53 ///
54 bool empty() const { return list_.empty(); }
55 ///
56 iterator insetIterator(lyx::pos_type pos);
57 ///
58 const_iterator insetIterator(lyx::pos_type pos) const;
59 ///
60 void insert(InsetBase * inset, lyx::pos_type pos);
61 ///
62 void erase(lyx::pos_type pos);
63 ///
64 InsetBase * release(lyx::pos_type);
65 ///
66 InsetBase * get(lyx::pos_type pos) const;
67 ///
68 void increasePosAfterPos(lyx::pos_type pos);
69 ///
70 void decreasePosAfterPos(lyx::pos_type pos);
72 private:
73 ///
74 List list_;
77 #endif