]> git.lyx.org Git - features.git/blobdiff - src/FloatList.C
read the Changelog
[features.git] / src / FloatList.C
index d0a7263d888087c087979ce2057f9d65ea9d5260..61ac278a5dd067a6b62cd874c4c1baf9d29ca350 100644 (file)
@@ -56,5 +56,26 @@ string FloatList::defaultPlacement(string const & t) const
 }
 
 
+bool FloatList::typeExist(string const & t) const
+{
+       List::const_iterator cit = list.find(t);
+       return cit != list.end();
+}
+
+
+Floating const & FloatList::getType(string const & t) const
+{
+       // I wish we could use exceptions
+       List::const_iterator cit = list.find(t);
+       if (cit != list.end())
+               return (*cit).second;
+#ifdef HAVE_EXCEPTIONS
+       throw UnknownFloatType(t);
+#else
+       static Floating empty_float;
+       return empty_float;
+#endif
+}
+
 // The global floatlist
 FloatList floatList;