summaryrefslogtreecommitdiff
path: root/cli/runtime-inline.cxx
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 /cli/runtime-inline.cxx
parent50a1ae06f83a353a3b9ff7d473122e60ad5f5636 (diff)
Add support for multiple file options and file search callbacks
Diffstat (limited to 'cli/runtime-inline.cxx')
-rw-r--r--cli/runtime-inline.cxx43
1 files changed, 41 insertions, 2 deletions
diff --git a/cli/runtime-inline.cxx b/cli/runtime-inline.cxx
index 633d7db..4d95a78 100644
--- a/cli/runtime-inline.cxx
+++ b/cli/runtime-inline.cxx
@@ -189,11 +189,15 @@ generate_runtime_inline (context& ctx)
<< "const std::string& option," << endl
<< "bool erase)" << endl
<< ": argv_scanner (argc, argv, erase)," << endl
- << " option_ (option)";
+ << " option_ (option)," << endl
+ << " options_ (&option_info_)," << endl
+ << " options_count_ (1)";
if (sep)
os << "," << endl
<< " skip_ (false)";
os << "{"
+ << "option_info_.option = option_.c_str ();"
+ << "option_info_.search_func = 0;"
<< "}";
os << inl << "argv_file_scanner::" << endl
@@ -203,7 +207,42 @@ generate_runtime_inline (context& ctx)
<< "const std::string& option," << endl
<< "bool erase)" << endl
<< ": argv_scanner (start, argc, argv, erase)," << endl
- << " option_ (option)";
+ << " option_ (option)," << endl
+ << " options_ (&option_info_)," << endl
+ << " options_count_ (1)";
+ if (sep)
+ os << "," << endl
+ << " skip_ (false)";
+ os << "{"
+ << "option_info_.option = option_.c_str ();"
+ << "option_info_.search_func = 0;"
+ << "}";
+
+ os << inl << "argv_file_scanner::" << endl
+ << "argv_file_scanner (int& argc," << endl
+ << "char** argv," << endl
+ << "const option_info* options," << endl
+ << "std::size_t options_count," << endl
+ << "bool erase)" << endl
+ << ": argv_scanner (argc, argv, erase)," << endl
+ << " options_ (options)," << endl
+ << " options_count_ (options_count)";
+ if (sep)
+ os << "," << endl
+ << " skip_ (false)";
+ os << "{"
+ << "}";
+
+ os << inl << "argv_file_scanner::" << endl
+ << "argv_file_scanner (int start," << endl
+ << "int& argc," << endl
+ << "char** argv," << endl
+ << "const option_info* options," << endl
+ << "std::size_t options_count," << endl
+ << "bool erase)" << endl
+ << ": argv_scanner (start, argc, argv, erase)," << endl
+ << " options_ (options)," << endl
+ << " options_count_ (options_count)";
if (sep)
os << "," << endl
<< " skip_ (false)";