2000-06-28 13:35:52 +00:00
|
|
|
// -*- C++ -*-
|
2003-08-23 00:17:00 +00:00
|
|
|
/**
|
|
|
|
* \file FloatList.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:27:08 +00:00
|
|
|
*
|
2008-11-14 15:58:50 +00:00
|
|
|
* \author Lars Gullik Bjønnes
|
2000-06-28 13:35:52 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2000-06-28 13:35:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FLOATLIST_H
|
|
|
|
#define FLOATLIST_H
|
|
|
|
|
2004-11-16 20:41:38 +00:00
|
|
|
#include "Floating.h"
|
|
|
|
|
2000-06-28 13:35:52 +00:00
|
|
|
#include <map>
|
2003-10-07 06:45:25 +00:00
|
|
|
#include <string>
|
2000-06-28 13:35:52 +00:00
|
|
|
|
2003-09-04 03:54:04 +00:00
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
|
|
|
class FloatList {
|
|
|
|
public:
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
typedef std::map<std::string, Floating> List;
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
typedef List::const_iterator const_iterator;
|
|
|
|
///
|
2000-07-04 19:16:35 +00:00
|
|
|
FloatList();
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2000-12-29 12:48:02 +00:00
|
|
|
const_iterator begin() const;
|
|
|
|
///
|
|
|
|
const_iterator end() const;
|
|
|
|
///
|
2000-07-04 19:16:35 +00:00
|
|
|
void newFloat(Floating const & fl);
|
2000-06-28 13:35:52 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
std::string const defaultPlacement(std::string const & t) const;
|
2000-07-15 23:51:46 +00:00
|
|
|
///
|
2015-05-22 08:37:14 +00:00
|
|
|
std::string const allowedPlacement(std::string const & t) const;
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
bool typeExist(std::string const & t) const;
|
2000-07-15 23:51:46 +00:00
|
|
|
///
|
2015-05-22 16:59:17 +00:00
|
|
|
bool allowsWide(std::string const & t) const;
|
|
|
|
///
|
|
|
|
bool allowsSideways(std::string const & t) const;
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
Floating const & getType(std::string const & t) const;
|
2000-12-29 12:48:02 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
void erase(std::string const & t);
|
2002-09-11 07:39:55 +00:00
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
const_iterator operator[](std::string const & t) const;
|
2000-06-28 13:35:52 +00:00
|
|
|
private:
|
|
|
|
///
|
|
|
|
List list;
|
|
|
|
};
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
} // namespace lyx
|
|
|
|
|
2000-06-28 13:35:52 +00:00
|
|
|
#endif
|