3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
13 #include "FloatList.h"
20 FloatList::FloatList()
24 FloatList::const_iterator FloatList::begin() const
30 FloatList::const_iterator FloatList::end() const
36 void FloatList::newFloat(Floating const & fl)
38 list[fl.floattype()] = fl;
42 string const FloatList::defaultPlacement(string const & t) const
44 List::const_iterator cit = list.find(t);
45 if (cit != list.end())
46 return cit->second.placement();
51 string const FloatList::allowedPlacement(string const & t) const
53 List::const_iterator cit = list.find(t);
54 if (cit != list.end())
55 return cit->second.allowedPlacement();
60 bool FloatList::typeExist(string const & t) const
62 List::const_iterator cit = list.find(t);
63 return cit != list.end();
67 bool FloatList::allowsWide(string const & t) const
69 List::const_iterator cit = list.find(t);
70 if (cit != list.end())
71 return cit->second.allowsWide();
76 bool FloatList::allowsSideways(string const & t) const
78 List::const_iterator cit = list.find(t);
79 if (cit != list.end())
80 return cit->second.allowsSideways();
85 Floating const & FloatList::getType(string const & t) const
87 // I wish we could use exceptions
88 List::const_iterator cit = list.find(t);
89 if (cit != list.end())
91 #ifdef HAVE_EXCEPTIONS
92 throw UnknownFloatType(t);
94 static Floating const empty_float;
100 void FloatList::erase(string const & t)
106 FloatList::const_iterator FloatList::operator[](string const & t) const