Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Commit [cfa962] Maximize Restore History

Renamed ConsoleWatchDog to WatchDog.

Fixed threading where a thread was trying to join itself.

Matthew Sherborne Matthew Sherborne 2014-04-17

changed mvc
changed mvc/apps
changed mvc/apps/mvcConsole.cpp
changed mvc/apps/test_controller.cpp
changed mvc/mvclib
changed mvc/mvclib/controllers
changed mvc/mvclib/controllers/Controller.hpp
changed mvc/mvclib/models
changed mvc/mvclib/models/minimalbeatmodel.cpp
changed mvc/mvclib/models/nonthreadablemodel.cpp
changed mvc/mvclib/views
copied mvc/mvclib/views/ConsoleWatchDog.hpp -> mvc/mvclib/views/WatchDog.hpp
mvc
Directory.
mvc/apps
Directory.
mvc/apps/mvcConsole.cpp Diff Switch to side-by-side view
Loading...
mvc/apps/test_controller.cpp Diff Switch to side-by-side view
Loading...
mvc/mvclib
Directory.
mvc/mvclib/controllers/Controller.hpp Diff Switch to side-by-side view
Loading...
mvc/mvclib/models
Directory.
mvc/mvclib/models/minimalbeatmodel.cpp Diff Switch to side-by-side view
Loading...
mvc/mvclib/models/nonthreadablemodel.cpp Diff Switch to side-by-side view
Loading...
mvc/mvclib/views
Directory.
mvc/mvclib/views/ConsoleWatchDog.hpp to mvc/mvclib/views/WatchDog.hpp
--- a/mvc/mvclib/views/ConsoleWatchDog.hpp
+++ b/mvc/mvclib/views/WatchDog.hpp
@@ -6,12 +6,12 @@
 
 #include <iostream>
 
-class ConsoleWatchDogView : public IView {
+class WatchDogView : public IView {
 private:
      IController4View* controller;
      int beatsToGo;
 public:
-     ConsoleWatchDogView(IController4View* controller, int maxBeats=10) : controller(controller), beatsToGo(maxBeats) {}
+     WatchDogView(IController4View* controller, int maxBeats=10) : controller(controller), beatsToGo(maxBeats) {}
      /// Called when a beat happens
      virtual void operator()() override {
           std::cout <<"the watch dog operator()() saw a beat\n";
@@ -25,7 +25,7 @@
      virtual void operator()(int) override {}
      virtual void createView() override {
           cout << "Number of beats:";
-          cin >> beatsToGo;
+          beatsToGo = 2;
      }
      virtual void updateBeat() override {std::cout <<"the watch dog updateBeat() saw a beat\n"; }
      virtual void increaseBPM() override {controller->increaseBPM(); }