diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-06-29 05:34:39 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-06-29 05:34:39 +0000 |
commit | dcd914665f6e8ea6ea4e648f7357f1c842273d87 (patch) | |
tree | df65caa1914fafdc68ec55b56524edfc7469321e /src/test/param.cpp | |
parent | 9b52daa8512c34b9484ea43302578bc879d212da (diff) | |
download | libbu++-dcd914665f6e8ea6ea4e648f7357f1c842273d87.tar.gz libbu++-dcd914665f6e8ea6ea4e648f7357f1c842273d87.tar.bz2 libbu++-dcd914665f6e8ea6ea4e648f7357f1c842273d87.tar.xz libbu++-dcd914665f6e8ea6ea4e648f7357f1c842273d87.zip |
All done with all of the basic and some nice, extended functionality, now I
just need to update our other projects...
Diffstat (limited to '')
-rw-r--r-- | src/test/param.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/test/param.cpp b/src/test/param.cpp index 0641f90..a4d2824 100644 --- a/src/test/param.cpp +++ b/src/test/param.cpp | |||
@@ -3,12 +3,16 @@ | |||
3 | 3 | ||
4 | Param::Param() | 4 | Param::Param() |
5 | { | 5 | { |
6 | addParam( "name", 's', mkproc( Param::printStuff ), &str ); | 6 | addHelpBanner("param - A test of the libbu++ parameter systems\n" |
7 | "Enjoy with care and caution\n\nTest stuff:\n"); | ||
8 | addParam( "name", 's', mkproc( Param::printStuff ), &str, "Test a param param" ); | ||
7 | //addParam( "name", &str ); | 9 | //addParam( "name", &str ); |
8 | addParam( "job", 'U', mkproc( Param::printStuff ) ); | 10 | addParam( "job", 'U', mkproc( Param::printStuff ), "Test a paramless param" ); |
9 | 11 | ||
10 | // --name=Bobo | 12 | addHelpBanner("\nInformational:\n"); |
11 | // --job hello | 13 | addParam( "help", mkproc( ParamProc::help ), "Help!" ); |
14 | |||
15 | addHelpBanner("\nThanks for trying my test!\n\n"); | ||
12 | } | 16 | } |
13 | 17 | ||
14 | Param::~Param() | 18 | Param::~Param() |
@@ -30,11 +34,13 @@ int Param::printStuff( int argc, char *argv[] ) | |||
30 | 34 | ||
31 | int main( int argc, char *argv[] ) | 35 | int main( int argc, char *argv[] ) |
32 | { | 36 | { |
33 | printf("Starting...\n"); | 37 | if( argc == 1 ) |
38 | { | ||
39 | printf("You have to enter some parameter, try '--help'\n\n"); | ||
40 | return 0; | ||
41 | } | ||
42 | |||
34 | Param p; | 43 | Param p; |
35 | p.process( argc, argv ); | 44 | p.process( argc, argv ); |
36 | |||
37 | //printf("Calling by hand...\n"); | ||
38 | //p.printStuff(); | ||
39 | } | 45 | } |
40 | 46 | ||