From 9b52daa8512c34b9484ea43302578bc879d212da Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 29 Jun 2006 03:07:26 +0000 Subject: Added the outlines for command parameter handling, for unknown parameter handling, and for automated help generation. --- src/paramproc.cpp | 15 +++++++++++++++ src/paramproc.h | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/src/paramproc.cpp b/src/paramproc.cpp index 10284c4..eaaf466 100644 --- a/src/paramproc.cpp +++ b/src/paramproc.cpp @@ -396,3 +396,18 @@ ParamProc::ArgSpec *ParamProc::checkLetr( const char arg ) return NULL; } +int ParamProc::cmdParam( int argc, char *argv[] ) +{ + printf("Unhandled command parameter \"%s\" found!\n", argv[0] ); +} + +int ParamProc::unknownParam( int argc, char *argv[] ) +{ + printf("Unknown parameter \"%s\" found!\n", argv[0] ); +} + +int ParamProc::help( int argc, char *argv[] ) +{ + // Insert help here later on +} + diff --git a/src/paramproc.h b/src/paramproc.h index b7450b7..d462eac 100644 --- a/src/paramproc.h +++ b/src/paramproc.h @@ -130,6 +130,11 @@ public: ArgSpec *checkWord( const char *arg ); ArgSpec *checkLetr( const char arg ); +public: + virtual int cmdParam( int argc, char *argv[] ); + virtual int unknownParam( int argc, char *argv[] ); + virtual int help( int argc, char *argv[] ); + private: std::list lArg; }; -- cgit v1.2.3