From 5443c7182151c7f9082e58f207d7c88e11826d08 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Sun, 6 Mar 2011 12:08:34 +0100 Subject: updated code structure, main loop now separate from fbgui class....... --- src/CommandLineOptions.cpp | 43 ------------------------------------------- 1 file changed, 43 deletions(-) delete mode 100644 src/CommandLineOptions.cpp (limited to 'src/CommandLineOptions.cpp') diff --git a/src/CommandLineOptions.cpp b/src/CommandLineOptions.cpp deleted file mode 100644 index 945cff9..0000000 --- a/src/CommandLineOptions.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* - * This class parses the command line options. - */ - -#include -#include -#include -#include "CommandLineOptions.h" - -CommandLineOptions::CommandLineOptions(int argc, char * const argv[]){ - qDebug() << "Received " << argc << "arguments."; - for (int i = argc; i != 0; i--) - qDebug() << i << " argument: " << argv[i]; - // Parse command line arguments. - int longIndex = 0; - static const char *optString = "u:h"; - static const struct option longOpts[] = - { - {"url", required_argument, NULL, 'u'}, - {"help", no_argument, NULL, 'h'} - }; - // getopt_long returns the index of the next argument to be read, -1 if there are no more arguments. - int opt = getopt_long(argc, argv, optString, longOpts, &longIndex); - while (opt != -1) - { - switch(opt) - { - case 'u': - options.insert("url", optarg); - qDebug() << "Added URL to clOptions:" << optarg; - break; - case 'h': - options.insert("help", "help"); - qDebug() << "Added help to clOptions."; - break; - } - opt = getopt_long(argc, argv, optString, longOpts, &longIndex); - } -} - -CommandLineOptions::~CommandLineOptions(){ - -} -- cgit v1.2.3-55-g7522