This repository has been archived on 2022-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
glyphs-juke/src/iInputMatcher.h

35 lines
602 B
C
Raw Normal View History

2021-08-26 05:51:50 +00:00
#pragma once
#include <string>
namespace gj {
class iInputMatcher {
public:
struct State {
std::wstring text;
size_t match;
};
iInputMatcher(iInputMatcher&&) = default;
iInputMatcher(const iInputMatcher&) = default;
iInputMatcher& operator=(iInputMatcher&&) = default;
iInputMatcher& operator=(const iInputMatcher&) = default;
iInputMatcher() = default;
virtual ~iInputMatcher() = default;
virtual bool Input(wchar_t c) = 0;
virtual const std::wstring& expects() const = 0;
virtual bool done() const = 0;
virtual const State& state() const = 0;
};
}