summaryrefslogtreecommitdiff
path: root/ace/Arg_Shifter.h
diff options
context:
space:
mode:
authorljb1 <ljb1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-13 18:33:22 +0000
committerljb1 <ljb1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-09-13 18:33:22 +0000
commit8c87ea41ff90d4eaca198cfc8cfc7ebe68c95d22 (patch)
tree8ae24ce675b3575ea1927af7e9b1da25722651a1 /ace/Arg_Shifter.h
parent4fe0b65e50654603333bc1b175269aeacb363e14 (diff)
downloadATCD-8c87ea41ff90d4eaca198cfc8cfc7ebe68c95d22.tar.gz
ChangeLogTag: Mon Sep 13 13:31:23 1999 Luther J Baker <ljb1@cs.wustl.edu>
Diffstat (limited to 'ace/Arg_Shifter.h')
-rw-r--r--ace/Arg_Shifter.h48
1 files changed, 30 insertions, 18 deletions
diff --git a/ace/Arg_Shifter.h b/ace/Arg_Shifter.h
index cd1f5517344..41769d17320 100644
--- a/ace/Arg_Shifter.h
+++ b/ace/Arg_Shifter.h
@@ -54,24 +54,36 @@ public:
char* get_current (void) const;
// Get the current head of the vector.
- char* get_current_parameter (int offset = 0);
- // After checking for a flag, use this method return the parameter
- // Safe to call without checking for current argument
- //
- // If offset > 0, returns current argument + offset
- // if (offset == 2) ... "value" returns pointer to "lue"
- // if (offset == 7) ... "value" returns 0
- //
- // If offset == 0
- // consumes current argument
- // if (is_parameter_next ()) is true
- // then returns a pointer to the new current argument
- // else returns 0
- //
- // If offset < 0, returns current argument with offset
- // but offset counts from the back
- // if (offset == -2) ... "value" returns pointer to "ue"
- // if (offset == -9) ... "value" returns 0
+ char* get_the_parameter (const char* flag);
+ // If the <flag> matches the current_arg of arg shifter
+ // this method will attempt to return the associated
+ // parameter value
+ //
+ // Safe to call without checking for a current argument
+ //
+ // A char* to 'value' is returned:
+ //
+ // eg: main -foobar value, main -FooBar value
+ // main -FOOBARvalue
+ //
+ // all of the above will all match the <flag> == -FooBar
+ // and will return a char* to 'value'
+ //
+ // main -foobar 4 would succeed and return a char* to '4'
+ // main -foobar -4 wound not succeed (-4 is not a parameter)
+ // but instead, would return 0
+ //
+ // 0 is returned:
+ // If the current argument does not match flag
+ // If there is no parameter found after a 'matched' flag
+ //
+ // If the flag is mateched and the flag and paramter DO NOT RUN
+ // together, the flag is consumed, the parameter is returned,
+ // and the new current argument is the paramter value.
+ // ie '-foobarflag VALUE
+ //
+ // If the flag is matched and the flag and parameter DO RUN
+ // together '-foobarflagVALUE, the flag is NOT consumed
int cur_arg_strncasecmp (const char* flag);
// Check if the current argument matches (case insensitive) <flag>