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;
|
2011-12-06 19:58:43 +01:00
|
|
|
class Modification;
|
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.
|
|
|
|
|
2011-12-06 19:58:43 +01:00
|
|
|
typedef std::function<void (Buffer& buffer, Modification& modification)> 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
|