diff options
Diffstat (limited to 'xsd/xsd/pregenerated/xsd/cxx')
-rw-r--r-- | xsd/xsd/pregenerated/xsd/cxx/options.cxx | 64 | ||||
-rw-r--r-- | xsd/xsd/pregenerated/xsd/cxx/options.hxx | 8 | ||||
-rw-r--r-- | xsd/xsd/pregenerated/xsd/cxx/options.ixx | 12 | ||||
-rw-r--r-- | xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx | 50 | ||||
-rw-r--r-- | xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx | 50 |
5 files changed, 181 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_ >; diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.hxx b/xsd/xsd/pregenerated/xsd/cxx/options.hxx index b01027a..085aa4c 100644 --- a/xsd/xsd/pregenerated/xsd/cxx/options.hxx +++ b/xsd/xsd/pregenerated/xsd/cxx/options.hxx @@ -313,6 +313,12 @@ namespace CXX dep_suffix_specified () const; const NarrowString& + dep_file () const; + + bool + dep_file_specified () const; + + const NarrowString& dep_regex () const; bool @@ -428,6 +434,8 @@ namespace CXX bool dep_target_specified_; NarrowString dep_suffix_; bool dep_suffix_specified_; + NarrowString dep_file_; + bool dep_file_specified_; NarrowString dep_regex_; bool dep_regex_specified_; }; diff --git a/xsd/xsd/pregenerated/xsd/cxx/options.ixx b/xsd/xsd/pregenerated/xsd/cxx/options.ixx index e8ba2fb..8266e31 100644 --- a/xsd/xsd/pregenerated/xsd/cxx/options.ixx +++ b/xsd/xsd/pregenerated/xsd/cxx/options.ixx @@ -585,6 +585,18 @@ namespace CXX } inline const NarrowString& options:: + dep_file () const + { + return this->dep_file_; + } + + inline bool options:: + dep_file_specified () const + { + return this->dep_file_specified_; + } + + inline const NarrowString& options:: dep_regex () const { return this->dep_regex_; diff --git a/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx index 04cb7ae..60667ac 100644 --- a/xsd/xsd/pregenerated/xsd/cxx/parser/options.cxx +++ b/xsd/xsd/pregenerated/xsd/cxx/parser/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) diff --git a/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx b/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx index 60ddeb0..17214c1 100644 --- a/xsd/xsd/pregenerated/xsd/cxx/tree/options.cxx +++ b/xsd/xsd/pregenerated/xsd/cxx/tree/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) |