diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2023-03-20 16:51:13 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2023-03-20 16:51:13 +0300 |
commit | cf49a3da69d4b46bd93e4454451787de1e43bad4 (patch) | |
tree | 5e0e4821b6bcd2c7278f1dacd5081ec3678e4ee5 | |
parent | e09f0f48b15106ac4048a28eb699e3d4cf43020c (diff) |
Regenerate options parsing files
-rw-r--r-- | odb/sqlite/details/pregenerated/odb/sqlite/details/options.cxx | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/odb/sqlite/details/pregenerated/odb/sqlite/details/options.cxx b/odb/sqlite/details/pregenerated/odb/sqlite/details/options.cxx index a3a2c3e..12f4193 100644 --- a/odb/sqlite/details/pregenerated/odb/sqlite/details/options.cxx +++ b/odb/sqlite/details/pregenerated/odb/sqlite/details/options.cxx @@ -669,6 +669,53 @@ namespace odb } }; + template <typename K, typename V, typename C> + struct parser<std::multimap<K, V, C> > + { + static void + parse (std::multimap<K, V, C>& m, 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 + }; + + if (!kstr.empty ()) + { + av[1] = const_cast<char*> (kstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser<K>::parse (k, s); + } + + if (!vstr.empty ()) + { + av[1] = const_cast<char*> (vstr.c_str ()); + argv_scanner s (0, ac, av, false, pos); + parser<V>::parse (v, s); + } + + m.insert (typename std::multimap<K, V, C>::value_type (k, v)); + } + else + throw missing_value (o); + } + }; + template <typename X, typename T, T X::*M> void thunk (X& x, scanner& s) |