]> git.tdb.fi Git - r2c2.git/blobdiff - source/shoppinglist/main.cpp
Add basic support for signals
[r2c2.git] / source / shoppinglist / main.cpp
index f82a97e0a84fe8e06ce66e3b5ce42cc3f442bf6b..94976a25bca0ffb21b7e8a9fda292cf957709fb2 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of R²C²
-Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #include <map>
 #include <msp/core/application.h>
 #include <msp/core/getopt.h>
@@ -17,7 +10,7 @@ using namespace std;
 using namespace Msp;
 using namespace R2C2;
 
-class ShoppingList: public Application
+class ShoppingList: public RegisteredApplication<ShoppingList>
 {
 private:
        class InventoryLoader: public DataFile::Loader
@@ -43,8 +36,6 @@ private:
        map<ArticleNumber, unsigned> inventory;
        map<ArticleNumber, unsigned> layout;
 
-       static Application::RegApp<ShoppingList> reg;
-
 public:
        ShoppingList(int, char **);
        int main();
@@ -54,8 +45,6 @@ private:
 };
 
 
-Application::RegApp<ShoppingList> ShoppingList::reg;
-
 ShoppingList::ShoppingList(int argc, char **argv)
 {
        string inv_fn = "inventory";
@@ -141,6 +130,7 @@ ShoppingList::LayoutLoader::LayoutLoader(ShoppingList &s):
        add("track", &LayoutLoader::track);
        add("base");
        add("route");
+       add("signal");
        add("zone");
 }