mirror of https://github.com/tstack/lnav
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
700 B
C++
34 lines
700 B
C++
12 years ago
|
|
||
|
#ifndef __grep_highlighter_hh
|
||
|
#define __grep_highlighter_hh
|
||
|
|
||
|
#include <string>
|
||
|
#include <memory>
|
||
|
|
||
|
#include "grep_proc.hh"
|
||
|
#include "textview_curses.hh"
|
||
|
|
||
|
class grep_highlighter {
|
||
|
public:
|
||
|
grep_highlighter(std::auto_ptr < grep_proc > gp,
|
||
|
std::string hl_name,
|
||
|
textview_curses::highlight_map_t &hl_map)
|
||
|
: gh_grep_proc(gp),
|
||
|
gh_hl_name(hl_name),
|
||
|
gh_hl_map(hl_map) { };
|
||
|
|
||
|
~grep_highlighter()
|
||
|
{
|
||
|
this->gh_hl_map.erase(this->gh_hl_map.find(this->gh_hl_name));
|
||
|
};
|
||
|
|
||
|
grep_proc *get_grep_proc() { return this->gh_grep_proc.get(); };
|
||
|
|
||
|
private:
|
||
|
std::auto_ptr<grep_proc> gh_grep_proc;
|
||
|
std::string gh_hl_name;
|
||
|
textview_curses::highlight_map_t gh_hl_map;
|
||
|
};
|
||
|
|
||
|
#endif
|