lib/dbus/Types: support DBUS_TYPE_DICT_ENTRY

This commit is contained in:
Max Kellermann 2018-06-03 12:19:14 +02:00
parent eeb00ac45b
commit b63664988f
1 changed files with 10 additions and 0 deletions

View File

@ -69,6 +69,16 @@ struct ArrayTypeTraits {
typedef TemplateString::InsertBefore<TYPE, typename ContainedTraits::TypeAsString> TypeAsString;
};
template<typename KeyT, typename ValueT>
struct DictEntryTypeTraits {
static constexpr int TYPE = DBUS_TYPE_DICT_ENTRY;
typedef TemplateString::Concat<TemplateString::CharAsString<DBUS_DICT_ENTRY_BEGIN_CHAR>,
typename KeyT::TypeAsString,
typename ValueT::TypeAsString,
TemplateString::CharAsString<DBUS_DICT_ENTRY_END_CHAR>> TypeAsString;
};
using VariantTypeTraits = BasicTypeTraits<DBUS_TYPE_VARIANT>;
template<typename T, typename... ContainedTraits>