diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-03-20 16:44:23 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-03-20 16:44:23 +0300 |
commit | 5386733d69d7531118422a9f6f2f4c526f51884d (patch) | |
tree | 55d4d3c33db8928aa7f36e3f24b6a2ec4c8049a9 | |
parent | 5652354aa256426c5ab32c4a1c5687e5509af868 (diff) |
Regenerate options parsing files
-rw-r--r-- | doc/pregenerated/odb.1 | 2 | ||||
-rw-r--r-- | doc/pregenerated/odb.xhtml | 4 | ||||
-rw-r--r-- | odb/pregenerated/odb/options.cxx | 50 |
3 files changed, 53 insertions, 3 deletions
diff --git a/doc/pregenerated/odb.1 b/doc/pregenerated/odb.1 index 10367a9..42d81d0 100644 --- a/doc/pregenerated/odb.1 +++ b/doc/pregenerated/odb.1 @@ -790,7 +790,7 @@ Send bug reports to the odb-users@codesynthesis.com mailing list. .\" COPYRIGHT .\" .SH COPYRIGHT -Copyright (c) 2009-2022 Code Synthesis Tools CC. +Copyright (c) 2009-2023 Code Synthesis Tools CC. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, diff --git a/doc/pregenerated/odb.xhtml b/doc/pregenerated/odb.xhtml index a987633..0a9785c 100644 --- a/doc/pregenerated/odb.xhtml +++ b/doc/pregenerated/odb.xhtml @@ -4,7 +4,7 @@ <head> <title>ODB 2.4.0 Compiler Command Line Manual</title> - <meta name="copyright" content="© 2009-2022 Code Synthesis Tools CC"/> + <meta name="copyright" content="© 2009-2023 Code Synthesis Tools CC"/> <meta name="keywords" content="odb,object,relational,mapping,compiler,c++"/> <meta name="description" content="ODB Compiler Command Line Manual"/> @@ -963,7 +963,7 @@ </div> <div id="footer"> - Copyright © 2009-2022 Code Synthesis Tools CC. + Copyright © 2009-2023 Code Synthesis Tools CC. <div id="terms"> Permission is granted to copy, distribute and/or modify this diff --git a/odb/pregenerated/odb/options.cxx b/odb/pregenerated/odb/options.cxx index 93335d2..da22570 100644 --- a/odb/pregenerated/odb/options.cxx +++ b/odb/pregenerated/odb/options.cxx @@ -689,6 +689,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) |