X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fshoppinglist%2Fmain.cpp;h=5f88780a7c02e937ca4fcfe4bc7cc36fcfa84f54;hb=52cbe8d99669f843f8f75c51128e2748584dd03a;hp=a87e2f8cab7a817db5d78ed36b6ae0bade96fe00;hpb=6c61179fe09af2f5366d50f10aadbf5f83438087;p=r2c2.git diff --git a/source/shoppinglist/main.cpp b/source/shoppinglist/main.cpp index a87e2f8..5f88780 100644 --- a/source/shoppinglist/main.cpp +++ b/source/shoppinglist/main.cpp @@ -1,9 +1,8 @@ -#include #include #include #include -#include -#include +#include +#include using namespace std; using namespace Msp; @@ -14,7 +13,7 @@ public: ShoppingList(int, char **); void print(ostream &); private: - class InventoryLoader: public Parser::Loader + class InventoryLoader: public DataFile::Loader { public: InventoryLoader(ShoppingList &); @@ -24,7 +23,7 @@ private: void track(unsigned, unsigned); }; - class LayoutLoader: public Parser::Loader + class LayoutLoader: public DataFile::Loader { public: LayoutLoader(ShoppingList &); @@ -63,16 +62,16 @@ ShoppingList::ShoppingList(int argc, char **argv) void ShoppingList::load_inventory(const string &fn) { - ifstream in(fn.c_str()); - Parser::Parser parser(in, fn); + IO::File in(fn); + DataFile::Parser parser(in, fn); InventoryLoader il(*this); il.load(parser); } void ShoppingList::load_layout(const string &fn) { - ifstream in(fn.c_str()); - Parser::Parser parser(in, fn); + IO::File in(fn); + DataFile::Parser parser(in, fn); LayoutLoader ll(*this); ll.load(parser); }