refs #140, removed MACRO DBUS_ENUM_MARSHALLING, changed to template

discussed in https://dev.vatsim-germany.org/issues/140#change-864
This commit is contained in:
Klaus Basan
2014-03-11 21:08:59 +01:00
parent ffc03e46f5
commit 0d306861f0
13 changed files with 21 additions and 38 deletions

View File

@@ -198,23 +198,4 @@ namespace BlackMisc
} // BlackMisc
/*!
* \brief Macro to make a ENUMs DBus streamable.
* \details Put this macro outside of any namespace, in the same header as the class defining the enumeration.
* \param ENUM The fully qualified name of the enumeration.
* \hideinitializer
* \ingroup Tuples
*/
#define BLACK_DBUS_ENUM_MARSHALLING(ENUM) \
namespace BlackMisc \
{ \
inline const QDBusArgument &operator >>(const QDBusArgument &arg, ENUM &enumType) \
{ \
uint e; \
arg >> e; \
enumType = static_cast<ENUM>(e); \
return arg; \
}; \
}
#endif // guard