t-suw****@users*****
t-suw****@users*****
2007年 9月 23日 (日) 23:56:54 JST
Index: AquaSKK/src/controller/SKKController.cpp diff -u AquaSKK/src/controller/SKKController.cpp:1.1.2.2 AquaSKK/src/controller/SKKController.cpp:1.1.2.3 --- AquaSKK/src/controller/SKKController.cpp:1.1.2.2 Sun Sep 16 09:21:45 2007 +++ AquaSKK/src/controller/SKKController.cpp Sun Sep 23 23:56:54 2007 @@ -34,11 +34,6 @@ stack_.push_back(SKKEditor()); } -// å¦ççµæ -const Output& SKKController::Result() const { - return editor().Result(); -} - // ãã¼å ¥åå¦ç State SKKController::HandleInput(const SKKEventParam& param) { return invoke(&SKKEditor::HandleInput, param); Index: AquaSKK/src/controller/SKKController.h diff -u AquaSKK/src/controller/SKKController.h:1.1.2.1 AquaSKK/src/controller/SKKController.h:1.1.2.2 --- AquaSKK/src/controller/SKKController.h:1.1.2.1 Sun Sep 2 12:36:25 2007 +++ AquaSKK/src/controller/SKKController.h Sun Sep 23 23:56:54 2007 @@ -1,5 +1,5 @@ /* -*- C++ -*- - $Id: SKKController.h,v 1.1.2.1 2007/09/02 03:36:25 t-suwa Exp $ + $Id: SKKController.h,v 1.1.2.2 2007/09/23 14:56:54 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -27,19 +27,19 @@ #include <vector> #include "SKK.h" #include "SKKEventParam.h" -#include "SKKEnvironment.h" +#include "SKKEngine.h" #include "SKKEditor.h" -struct SKKController { - typedef SKKEnvironment::State State; - typedef SKKEnvironment::Event Event; - typedef SKKEnvironment::Handler Handler; - typedef SKKEnvironment::Output Output; +class SKKController : public StateContainerTraits<SKKEngine> { + std::vector<SKKEditor> stack_; - SKKController(); + SKKEditor& editor(); + const SKKEditor& editor() const; - // å¦ççµæ - const Output& Result() const; + State invoke(SKKEditor::Handler handler, const SKKEventParam& param); + +public: + SKKController(); // ãã¼å ¥åå¦ç State HandleInput(const SKKEventParam& param); @@ -64,14 +64,6 @@ // å帰çè¾æ¸ç»é² void BeginRegistration(const std::string& prompt); void EndRegistration(bool commit); - -private: - std::vector<SKKEditor> stack_; - - SKKEditor& editor(); - const SKKEditor& editor() const; - - State invoke(SKKEditor::Handler handler, const SKKEventParam& param); }; #endif Index: AquaSKK/src/controller/SKKSubController.h diff -u AquaSKK/src/controller/SKKSubController.h:1.1.2.1 AquaSKK/src/controller/SKKSubController.h:1.1.2.2 --- AquaSKK/src/controller/SKKSubController.h:1.1.2.1 Sun Sep 2 12:36:25 2007 +++ AquaSKK/src/controller/SKKSubController.h Sun Sep 23 23:56:54 2007 @@ -25,12 +25,7 @@ #include "SKKController.h" // SKKController ç¨ãããã¥ã¬ã¼ã¿ã¼ -struct SKKSubController { - typedef SKKController::State State; - typedef SKKController::Event Event; - typedef SKKController::Handler Handler; - typedef SKKController::Output Output; - +struct SKKSubController : public StateContainerTraits<SKKEngine> { virtual State Apply(SKKController& controller) = 0; };