1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
11 #include <anna/comm/Communicator.hpp>
13 #include <anna/test/Menu.hpp>
17 using namespace anna::comm;
19 const char* test::Menu::EventData = "test::Menu::Data";
21 test::Menu::Menu (Communicator* communicator) :
22 Handler (communicator, Type::Custom, false),
28 void test::Menu::paint () const
33 cout << "Elija operacion [+|-|*|/|q = quit]: " << flush;
36 cout << "Indique primer operador: " << flush;
39 cout << "Indique segundo operador: " << flush;
44 void test::Menu::apply ()
45 throw (RuntimeException)
49 cin >> a_data.a_operation;
50 switch (a_data.a_operation) {
53 a_communicator->requestStop ();
71 a_communicator->eventUser (EventData, &a_data);