actions: make find forward/backward incremental

This commit is contained in:
Andrzej Rybczak
2014-11-06 23:22:55 +01:00
parent 7c71df8dc7
commit 6a5f46a458
21 changed files with 236 additions and 229 deletions

View File

@@ -20,6 +20,33 @@
#include "enums.h"
std::ostream &operator<<(std::ostream &os, SearchDirection sd)
{
switch (sd)
{
case SearchDirection::Backward:
os << "backward";
break;
case SearchDirection::Forward:
os << "forward";
break;
}
return os;
}
std::istream &operator>>(std::istream &is, SearchDirection &sd)
{
std::string ssd;
is >> ssd;
if (ssd == "backward")
sd = SearchDirection::Backward;
else if (ssd == "forward")
sd = SearchDirection::Forward;
else
is.setstate(std::ios::failbit);
return is;
}
std::ostream &operator<<(std::ostream &os, SpaceAddMode sam)
{
switch (sam)