diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-22 22:19:46 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2014-11-22 22:19:46 +0100 |
commit | 3e7ebb5d7b1e477df943cd01f469cf5d20f1509d (patch) | |
tree | 49693e93e1a1621aef29bb9d3de9bead3e21aa48 /src/qregisters.h | |
parent | a6c13d77f2f5f504c7b99e66db5f7d52c1368b8a (diff) | |
download | sciteco-3e7ebb5d7b1e477df943cd01f469cf5d20f1509d.tar.gz |
added variant of the ^U command with string building: the EU command
it became apparent, that something like this is very useful,
when constructing the contents of a q-register without
editing it.
I have decided against introducing another modifier for toggling
string building. Most commands have string building enabled and it
doesn't hurt. For the few exceptions, an alternative variant can
be introduced.
Diffstat (limited to 'src/qregisters.h')
-rw-r--r-- | src/qregisters.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/qregisters.h b/src/qregisters.h index 9a7618b..80222f8 100644 --- a/src/qregisters.h +++ b/src/qregisters.h @@ -364,11 +364,20 @@ private: State *got_register(QRegister ®); }; +class StateEUCommand : public StateExpectQReg { +public: + StateEUCommand() : StateExpectQReg(true) {} + +private: + State *got_register(QRegister ®); +}; + class StateSetQRegString : public StateExpectString { bool text_added; public: - StateSetQRegString() : StateExpectString(false) {} + StateSetQRegString(bool building) + : StateExpectString(building) {} private: void initial(void); @@ -425,7 +434,9 @@ namespace States { extern StateEQCommand eqcommand; extern StateLoadQReg loadqreg; extern StateCtlUCommand ctlucommand; - extern StateSetQRegString setqregstring; + extern StateEUCommand eucommand; + extern StateSetQRegString setqregstring_nobuilding; + extern StateSetQRegString setqregstring_building; extern StateGetQRegString getqregstring; extern StateGetQRegInteger getqreginteger; extern StateSetQRegInteger setqreginteger; |