From: Mikko Rasa Date: Thu, 17 Jan 2013 12:21:27 +0000 (+0200) Subject: Derive application classes from RegisteredApplication X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=d5cac397cab236ac3e1e0bbbc38204890f87d164;p=r2c2.git Derive application classes from RegisteredApplication --- diff --git a/source/designer/designer.cpp b/source/designer/designer.cpp index 0effc93..07c2f78 100644 --- a/source/designer/designer.cpp +++ b/source/designer/designer.cpp @@ -38,8 +38,6 @@ using namespace std; using namespace R2C2; using namespace Msp; -Application::RegApp Designer::reg; - Designer::Designer(int argc, char **argv): window(1280, 960), ui_res("r2c2.res"), diff --git a/source/designer/designer.h b/source/designer/designer.h index 471bfc7..b19eb66 100644 --- a/source/designer/designer.h +++ b/source/designer/designer.h @@ -28,7 +28,7 @@ class Toolbar; -class Designer: public Msp::Application +class Designer: public Msp::RegisteredApplication { private: enum Mode @@ -70,8 +70,6 @@ private: Msp::Time::TimeStamp last_tick; - static Msp::Application::RegApp reg; - public: Designer(int, char **); ~Designer(); diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index b9e2523..7d1e227 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -33,8 +33,6 @@ using namespace std; using namespace R2C2; using namespace Msp; -Application::RegApp Engineer::reg; - Engineer::Engineer(int argc, char **argv): options(argc, argv), window(options.screen_w, options.screen_h, options.fullscreen), diff --git a/source/engineer/engineer.h b/source/engineer/engineer.h index 907fae0..85dc347 100644 --- a/source/engineer/engineer.h +++ b/source/engineer/engineer.h @@ -21,7 +21,7 @@ class MainPanel; class TrainPanel; class TrainView; -class Engineer: public Msp::Application +class Engineer: public Msp::RegisteredApplication { public: sigc::signal signal_pick_done; @@ -88,8 +88,6 @@ private: R2C2::Track *pick_track(int, int); void train_added(R2C2::Train &); virtual void sighandler(int); - - static Msp::Application::RegApp reg; }; #endif diff --git a/source/remote/remote.cpp b/source/remote/remote.cpp index b60d11f..dbcb7e4 100644 --- a/source/remote/remote.cpp +++ b/source/remote/remote.cpp @@ -10,8 +10,6 @@ using namespace std; using namespace Msp; -Application::RegApp Remote::reg; - Remote::Remote(int argc, char **argv): client(catalogue), gtk(argc, argv) diff --git a/source/remote/remote.h b/source/remote/remote.h index b4c5c12..875f25b 100644 --- a/source/remote/remote.h +++ b/source/remote/remote.h @@ -10,7 +10,7 @@ class MainPanel; class TrainPanel; -class Remote: public Msp::Application +class Remote: public Msp::RegisteredApplication { private: Msp::IO::EventDispatcher event_disp; @@ -22,8 +22,6 @@ private: MainPanel *main_panel; std::vector train_panels; - static Msp::Application::RegApp reg; - public: Remote(int argc, char **argv); diff --git a/source/serial/serial.cpp b/source/serial/serial.cpp index 13ffd9b..50f53bd 100644 --- a/source/serial/serial.cpp +++ b/source/serial/serial.cpp @@ -7,8 +7,6 @@ using namespace std; using namespace Msp; using namespace R2C2; -Application::RegApp Serial::reg; - Serial::Serial(int, char **argv): client(catalogue), serial_port(argv[2]), diff --git a/source/serial/serial.h b/source/serial/serial.h index b1f1908..d2ae4dd 100644 --- a/source/serial/serial.h +++ b/source/serial/serial.h @@ -5,7 +5,7 @@ #include #include "network/client.h" -class Serial: public Msp::Application +class Serial: public Msp::RegisteredApplication { private: Msp::IO::EventDispatcher event_disp; @@ -17,8 +17,6 @@ private: char rx_buf[3]; unsigned rx_fill; - static Msp::Application::RegApp reg; - public: Serial(int, char **); diff --git a/source/shoppinglist/main.cpp b/source/shoppinglist/main.cpp index ff281e6..8b0a6f6 100644 --- a/source/shoppinglist/main.cpp +++ b/source/shoppinglist/main.cpp @@ -10,7 +10,7 @@ using namespace std; using namespace Msp; using namespace R2C2; -class ShoppingList: public Application +class ShoppingList: public RegisteredApplication { private: class InventoryLoader: public DataFile::Loader @@ -36,8 +36,6 @@ private: map inventory; map layout; - static Application::RegApp reg; - public: ShoppingList(int, char **); int main(); @@ -47,8 +45,6 @@ private: }; -Application::RegApp ShoppingList::reg; - ShoppingList::ShoppingList(int argc, char **argv) { string inv_fn = "inventory";