summaryrefslogtreecommitdiff
path: root/includes/Main.h
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2012-09-05 23:05:40 -0700
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2012-09-05 23:05:40 -0700
commit043be8d07cf7901381895e7a6bad45ee3b71a5f2 (patch)
tree41b172acb66cb6502efbb7c5984e867838e5ad34 /includes/Main.h
parent79303cf5227bb21c203daa130c73cc28702cdf8e (diff)
Proper handling of argc / argv.
Diffstat (limited to 'includes/Main.h')
-rw-r--r--includes/Main.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/includes/Main.h b/includes/Main.h
index 60de081..49afd35 100644
--- a/includes/Main.h
+++ b/includes/Main.h
@@ -15,13 +15,16 @@ class Exit : public GeneralException {
class MainTask : public Task {
public:
- MainTask() : m_stopTaskManOnExit(true) { }
+ MainTask(int argc, char ** argv, char ** enve) : argc(argc), argv(argv), enve(enve) { }
virtual ~MainTask();
virtual const char * getName() const;
virtual void Do();
void stopTaskManOnExit(bool v) { m_stopTaskManOnExit = v; }
private:
- bool m_stopTaskManOnExit;
+ int argc;
+ char ** argv;
+ char ** enve;
+ bool m_stopTaskManOnExit = true;
};
class Main {
@@ -37,10 +40,6 @@ class Main {
static Status getStatus() { return s_application->m_status; }
int bootstrap(int _argc, char ** _argv);
static bool hasMain() { return s_application; }
- protected:
- int argc;
- char ** argv;
- char ** enve;
private:
Status m_status;
static Main * s_application;