summaryrefslogtreecommitdiff
path: root/xsd/xsd/pregenerated/xsd/cxx/options.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/xsd/pregenerated/xsd/cxx/options.cxx')
-rw-r--r--xsd/xsd/pregenerated/xsd/cxx/options.cxx64
1 files changed, 61 insertions, 3 deletions
diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/options.cxx
index f4d3fa7..9eea3a9 100644
--- a/xsd/xsd/pregenerated/xsd/cxx/options.cxx
+++ b/xsd/xsd/pregenerated/xsd/cxx/options.cxx
@@ -184,6 +184,56 @@ namespace cli
}
};
+ template <typename K, typename V, typename C>
+ struct parser<std::multimap<K, V, C> >
+ {
+ static void
+ parse (std::multimap<K, V, C>& m, bool& xs, scanner& s)
+ {
+ const char* o (s.next ());
+
+ if (s.more ())
+ {
+ std::size_t pos (s.position ());
+ std::string ov (s.next ());
+ std::string::size_type p = ov.find ('=');
+
+ K k = K ();
+ V v = V ();
+ std::string kstr (ov, 0, p);
+ std::string vstr (ov, (p != std::string::npos ? p + 1 : ov.size ()));
+
+ int ac (2);
+ char* av[] =
+ {
+ const_cast<char*> (o),
+ 0
+ };
+
+ bool dummy;
+ if (!kstr.empty ())
+ {
+ av[1] = const_cast<char*> (kstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<K>::parse (k, dummy, s);
+ }
+
+ if (!vstr.empty ())
+ {
+ av[1] = const_cast<char*> (vstr.c_str ());
+ argv_scanner s (0, ac, av, false, pos);
+ parser<V>::parse (v, dummy, s);
+ }
+
+ m.insert (typename std::multimap<K, V, C>::value_type (k, v));
+ }
+ else
+ throw missing_value (o);
+
+ xs = true;
+ }
+ };
+
template <typename X, typename T, T X::*M>
void
thunk (X& x, scanner& s)
@@ -216,7 +266,7 @@ namespace CXX
options::
options ()
- : std_ (cxx_version::cxx98),
+ : std_ (cxx_version::cxx11),
std_specified_ (false),
char_type_ ("char"),
char_type_specified_ (false),
@@ -311,6 +361,8 @@ namespace CXX
dep_target_specified_ (false),
dep_suffix_ (".d"),
dep_suffix_specified_ (false),
+ dep_file_ (),
+ dep_file_specified_ (false),
dep_regex_ (),
dep_regex_specified_ (false)
{
@@ -477,8 +529,11 @@ namespace CXX
os << "--dep-target <target> Change the target of the dependency rule." << ::std::endl;
- os << "--dep-suffix <suffix> Use the provided <suffix> instead of the default" << ::std::endl
- << " .d to construct the name of the dependency file." << ::std::endl;
+ os << "--dep-suffix <suffix> Use <suffix> instead of the default .d to" << ::std::endl
+ << " construct the name of the dependency file." << ::std::endl;
+
+ os << "--dep-file <path> Use <path> as the generated dependency file path" << ::std::endl
+ << " instead of deriving it from the input file name." << ::std::endl;
os << "--dep-regex <regex> Use the provided expression to construct the name" << ::std::endl
<< " of the dependency file." << ::std::endl;
@@ -646,6 +701,9 @@ namespace CXX
_cli_options_map_["--dep-suffix"] =
&::cli::thunk< options, NarrowString, &options::dep_suffix_,
&options::dep_suffix_specified_ >;
+ _cli_options_map_["--dep-file"] =
+ &::cli::thunk< options, NarrowString, &options::dep_file_,
+ &options::dep_file_specified_ >;
_cli_options_map_["--dep-regex"] =
&::cli::thunk< options, NarrowString, &options::dep_regex_,
&options::dep_regex_specified_ >;