summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-01-20 15:38:10 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-01-20 15:38:10 +0200
commit0267ede2d356abdef7b3e9af19d4725605a58947 (patch)
tree169a57693ec56a1273f2556d311d8df0d5b72974 /doc
parent50a1ae06f83a353a3b9ff7d473122e60ad5f5636 (diff)
Add support for multiple file options and file search callbacks
Diffstat (limited to 'doc')
-rw-r--r--doc/guide/index.xhtml32
1 files changed, 27 insertions, 5 deletions
diff --git a/doc/guide/index.xhtml b/doc/guide/index.xhtml
index 67d6569..bc215e3 100644
--- a/doc/guide/index.xhtml
+++ b/doc/guide/index.xhtml
@@ -732,22 +732,44 @@ namespace cli
public:
argv_file_scanner (int&amp; argc,
char** argv,
- const std::string&amp; file_option,
+ const std::string&amp; option,
bool erase = false);
argv_file_scanner (int start,
int&amp; argc,
char** argv,
- const std::string&amp; file_option,
+ const std::string&amp; option,
+ bool erase = false);
+
+ struct option_info
+ {
+ const char* option;
+ std::string (*search_func) (const char*, void* arg);
+ void* arg;
+ };
+
+ argv_file_scanner (int&amp; argc,
+ char** argv,
+ const option_info* options,
+ std::size_t options_count,
+ bool erase = false);
+
+ argv_file_scanner (int start,
+ int&amp; argc,
+ char** argv,
+ const option_info* options,
+ std::size_t options_count,
bool erase = false);
...
};
}
</pre>
- <p>The <code>file_option</code> argument is used to pass the option name
- that should be recognized as specifying the file containing additional
- options. Such a file contains a set of options, each appearing on a
+ <p>The <code>option</code> argument in the first two constructors and
+ the <code>options</code> and <code>options_count</code> arguments
+ in the last two are used to pass the option name(s) that should be
+ recognized as specifying the file containing additional options.
+ Such a file contains a set of options, each appearing on a
separate line optionally followed by space and an option value. Empty lines
and lines starting with <code>#</code> are ignored. Option values can
be enclosed in double (<code>"</code>) or single (<code>'</code>)