diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-15 08:22:58 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-03-15 08:22:58 +0200 |
commit | 927b97baaaf69e318ff7a0ce76d096375ec09da2 (patch) | |
tree | 074d633c92c99ec541e7f0631c2fd2a6c5378689 /cutl/xml/value-traits.hxx | |
parent | 6664a24b003f3959e2efe2893628f725a5f6746f (diff) |
Add support for returning XML attributes as map
Diffstat (limited to 'cutl/xml/value-traits.hxx')
-rw-r--r-- | cutl/xml/value-traits.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cutl/xml/value-traits.hxx b/cutl/xml/value-traits.hxx index f79f67f..0b95205 100644 --- a/cutl/xml/value-traits.hxx +++ b/cutl/xml/value-traits.hxx @@ -6,6 +6,7 @@ #define CUTL_XML_VALUE_TRAITS_HXX #include <string> +#include <cstddef> // std::size_t #include <cutl/details/export.hxx> @@ -19,6 +20,9 @@ namespace cutl template <typename T> struct default_value_traits { + static T + parse (std::string, const parser&); + static std::string serialize (const T&, const serializer&); }; @@ -26,6 +30,9 @@ namespace cutl template <> struct LIBCUTL_EXPORT default_value_traits<bool> { + static bool + parse (std::string, const parser&); + static std::string serialize (bool v, const serializer&) { @@ -35,6 +42,9 @@ namespace cutl template <typename T> struct value_traits: default_value_traits<T> {}; + + template <typename T, std::size_t N> + struct value_traits<T[N]>: default_value_traits<const T*> {}; } } |