From 036aee2a8daa457496a901378c811a97ee59648c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 29 Mar 2011 23:38:16 -0400 Subject: [PATCH] Enhancement - Began the new Context::initialize2, which will offer a different rabbit-hole to go down. This method will instantiate Command objects and the new Parser, rather than the monolithic alternative dispatch method and command.cpp/report.cpp/custom.cpp files. --- src/Context.cpp | 14 ++++++++++++++ src/Context.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/Context.cpp b/src/Context.cpp index d59455aad..864fe4e8c 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -66,6 +66,20 @@ Context::~Context () { } +//////////////////////////////////////////////////////////////////////////////// +void Context::initialize2 (int argc, char** argv) +{ + // TODO Capture the args. + // TODO Capture any stdin args. + // TODO Scan for rc: overrides --> apply. + // TODO Combine command line into one string. + // TODO Load relevant rc file. + // TODO Instantiate built-in command objects. + // TODO Instantiate extension command objects. + // TODO Instantiate default command object. + // TODO Chain-of-command pattern dispatch. +} + //////////////////////////////////////////////////////////////////////////////// void Context::initialize (int argc, char** argv) { diff --git a/src/Context.h b/src/Context.h index 175e5ce58..bc82041c6 100644 --- a/src/Context.h +++ b/src/Context.h @@ -47,6 +47,7 @@ public: Context& operator= (const Context&); void initialize (int, char**); // all startup + void initialize2 (int, char**); // all startup void initialize (); // for reinitializing int run (); // task classic int interactive (); // task interactive (not implemented)