Added methods to create a TQT_DBusDataMap<T> object from a TQMap<T, TQT_DBusDataMap<U> > map.

This fixes a compilation problem when objects with a signature like a{oa{...}} are generated.
This refers to issue #7.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/18/head
Michele Calgaro 5 years ago
parent 00b00f9961
commit 97bfc41b1b
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -485,6 +485,166 @@ public:
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT8> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_UINT8> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_UINT8> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_UINT8> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_UINT8> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromByteKeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_INT16> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_INT16> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_INT16> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_INT16> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_INT16> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromInt16KeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT16> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_UINT16> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_UINT16> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_UINT16> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_UINT16> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromUInt16KeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_INT32> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_INT32> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_INT32> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_INT32> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_INT32> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromInt32KeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT32> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_UINT32> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_UINT32> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_UINT32> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_UINT32> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromUInt32KeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_INT64> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_INT64> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_INT64> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_INT64> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_INT64> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromInt64KeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT64> values
*
* @param other the TQMap of TQT_DBusDataMap<TQ_UINT64> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQ_UINT64> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQ_UINT64> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQ_UINT64> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromUInt64KeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQString> values
*
* @param other the TQMap of TQT_DBusDataMap<TQString> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQString> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQString> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQString> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromStringKeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQT_DBusObjectPath> values
*
* @param other the TQMap of TQT_DBusDataMap<TQT_DBusObjectPath> values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQT_DBusObjectPath> >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQT_DBusObjectPath> >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQT_DBusObjectPath> >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromObjectPathKeyMap(it.data()));
}
}
/**
* @brief Creates a map from the given TQMap of TQT_DBusDataMap<TQT_DBusUnixFd > values
*
* @param other the TQMap of TQT_DBusDataMap<TQT_DBusUnixFd > values to copy from
*/
TQT_DBusDataMap<T>(const TQMap<T, TQT_DBusDataMap<TQT_DBusUnixFd > >& other)
: TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Map)
{
typename TQMap<T, TQT_DBusDataMap<TQT_DBusUnixFd > >::const_iterator it = other.begin();
typename TQMap<T, TQT_DBusDataMap<TQT_DBusUnixFd > >::const_iterator endIt = other.end();
for (; it != endIt; ++it)
{
insert(it.key(), TQT_DBusData::fromUnixFdKeyMap(it.data()));
}
}
/**
* @brief Copies from the given @p other map
*

Loading…
Cancel
Save