summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-06-29 03:07:26 +0000
committerMike Buland <eichlan@xagasoft.com>2006-06-29 03:07:26 +0000
commit9b52daa8512c34b9484ea43302578bc879d212da (patch)
treef10ce105b8c1c9f983e0f040b6f3176250453003 /src
parent5e386890b41fe043e2639b25b613831ef8362e7b (diff)
downloadlibbu++-9b52daa8512c34b9484ea43302578bc879d212da.tar.gz
libbu++-9b52daa8512c34b9484ea43302578bc879d212da.tar.bz2
libbu++-9b52daa8512c34b9484ea43302578bc879d212da.tar.xz
libbu++-9b52daa8512c34b9484ea43302578bc879d212da.zip
Added the outlines for command parameter handling, for unknown parameter
handling, and for automated help generation.
Diffstat (limited to 'src')
-rw-r--r--src/paramproc.cpp15
-rw-r--r--src/paramproc.h5
2 files changed, 20 insertions, 0 deletions
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 )
396 return NULL; 396 return NULL;
397} 397}
398 398
399int ParamProc::cmdParam( int argc, char *argv[] )
400{
401 printf("Unhandled command parameter \"%s\" found!\n", argv[0] );
402}
403
404int ParamProc::unknownParam( int argc, char *argv[] )
405{
406 printf("Unknown parameter \"%s\" found!\n", argv[0] );
407}
408
409int ParamProc::help( int argc, char *argv[] )
410{
411 // Insert help here later on
412}
413
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:
130 ArgSpec *checkWord( const char *arg ); 130 ArgSpec *checkWord( const char *arg );
131 ArgSpec *checkLetr( const char arg ); 131 ArgSpec *checkLetr( const char arg );
132 132
133public:
134 virtual int cmdParam( int argc, char *argv[] );
135 virtual int unknownParam( int argc, char *argv[] );
136 virtual int help( int argc, char *argv[] );
137
133private: 138private:
134 std::list<ArgSpec *> lArg; 139 std::list<ArgSpec *> lArg;
135}; 140};