using namespace R2C2;
using namespace Msp;
-Application::RegApp<Designer> Designer::reg;
-
Designer::Designer(int argc, char **argv):
window(1280, 960),
ui_res("r2c2.res"),
class Toolbar;
-class Designer: public Msp::Application
+class Designer: public Msp::RegisteredApplication<Designer>
{
private:
enum Mode
Msp::Time::TimeStamp last_tick;
- static Msp::Application::RegApp<Designer> reg;
-
public:
Designer(int, char **);
~Designer();
using namespace R2C2;
using namespace Msp;
-Application::RegApp<Engineer> Engineer::reg;
-
Engineer::Engineer(int argc, char **argv):
options(argc, argv),
window(options.screen_w, options.screen_h, options.fullscreen),
class TrainPanel;
class TrainView;
-class Engineer: public Msp::Application
+class Engineer: public Msp::RegisteredApplication<Engineer>
{
public:
sigc::signal<void, R2C2::Track *, int> signal_pick_done;
R2C2::Track *pick_track(int, int);
void train_added(R2C2::Train &);
virtual void sighandler(int);
-
- static Msp::Application::RegApp<Engineer> reg;
};
#endif
using namespace std;
using namespace Msp;
-Application::RegApp<Remote> Remote::reg;
-
Remote::Remote(int argc, char **argv):
client(catalogue),
gtk(argc, argv)
class MainPanel;
class TrainPanel;
-class Remote: public Msp::Application
+class Remote: public Msp::RegisteredApplication<Remote>
{
private:
Msp::IO::EventDispatcher event_disp;
MainPanel *main_panel;
std::vector<TrainPanel *> train_panels;
- static Msp::Application::RegApp<Remote> reg;
-
public:
Remote(int argc, char **argv);
using namespace Msp;
using namespace R2C2;
-Application::RegApp<Serial> Serial::reg;
-
Serial::Serial(int, char **argv):
client(catalogue),
serial_port(argv[2]),
#include <msp/io/serial.h>
#include "network/client.h"
-class Serial: public Msp::Application
+class Serial: public Msp::RegisteredApplication<Serial>
{
private:
Msp::IO::EventDispatcher event_disp;
char rx_buf[3];
unsigned rx_fill;
- static Msp::Application::RegApp<Serial> reg;
-
public:
Serial(int, char **);
using namespace Msp;
using namespace R2C2;
-class ShoppingList: public Application
+class ShoppingList: public RegisteredApplication<ShoppingList>
{
private:
class InventoryLoader: public DataFile::Loader
map<ArticleNumber, unsigned> inventory;
map<ArticleNumber, unsigned> layout;
- static Application::RegApp<ShoppingList> reg;
-
public:
ShoppingList(int, char **);
int main();
};
-Application::RegApp<ShoppingList> ShoppingList::reg;
-
ShoppingList::ShoppingList(int argc, char **argv)
{
string inv_fn = "inventory";