2011-12-02 15:28:27 +01:00
|
|
|
#ifndef filter_hh_INCLUDED
|
|
|
|
#define filter_hh_INCLUDED
|
|
|
|
|
2012-04-14 03:17:09 +02:00
|
|
|
#include "string.hh"
|
2011-12-02 15:28:27 +01:00
|
|
|
#include <functional>
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
class Buffer;
|
2012-08-10 19:12:43 +02:00
|
|
|
class BufferIterator;
|
2011-12-02 15:28:27 +01:00
|
|
|
|
2012-01-11 15:21:58 +01:00
|
|
|
// A Filter is a function which is applied to a Buffer and a pending
|
|
|
|
// Modification in order to mutate the Buffer or the Modification
|
|
|
|
// prior to it's application.
|
|
|
|
|
2012-08-10 19:12:43 +02:00
|
|
|
typedef std::function<void (Buffer& buffer, BufferIterator& position, String& content)> FilterFunc;
|
2012-04-14 03:17:09 +02:00
|
|
|
typedef std::pair<String, FilterFunc> FilterAndId;
|
2011-12-02 15:28:27 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // filter_hh_INCLUDED
|