June 2018
Intermediate to advanced
348 pages
8h 45m
English
The following example is a command-line program, with events to represent the primitive operations of a user interface application. We will be handling the flow of these events by using RxCpp in this program. This has been done for brevity in the code listing:
//--------- UI_EventsApp.cpp
#include <rxcpp/rx.hpp>
#include <cassert>
#include <cctype>
#include <clocale>
namespace Rx {
using namespace rxcpp;
using namespace rxcpp::sources;
using namespace rxcpp::operators;
using namespace rxcpp::util;
using namespace rxcpp::subjects;
}
using namespace Rx;
using namespace std::chrono;
// Application events
enum class AppEvent {
Active,
Inactive,
Data,
Close,
Finish,
Other
};
The libraries and namespaces that ...