DBus-1-TQt  1.0
TQT_DBusDataMap< T > Class Template Reference

#include <tqdbusdatamap.h>

+ Collaboration diagram for TQT_DBusDataMap< T >:

List of all members.

Public Types

typedef TQMapConstIterator< T,
TQT_DBusData
const_iterator

Public Member Functions

 TQT_DBusDataMap ()
 TQT_DBusDataMap (TQT_DBusData::Type simpleValueType)
 TQT_DBusDataMap (const TQT_DBusData &containerValueType)
 TQT_DBusDataMap (const TQT_DBusDataMap< T > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusData > &other)
 TQT_DBusDataMap (const TQMap< T, bool > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_UINT8 > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_INT16 > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_UINT16 > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_INT32 > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_UINT32 > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_INT64 > &other)
 TQT_DBusDataMap (const TQMap< T, TQ_UINT64 > &other)
 TQT_DBusDataMap (const TQMap< T, double > &other)
 TQT_DBusDataMap (const TQMap< T, TQString > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusObjectPath > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusUnixFd > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusVariant > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_UINT8 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_INT16 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_UINT16 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_INT32 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_UINT32 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_INT64 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQ_UINT64 > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQString > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQT_DBusObjectPath > > &other)
 TQT_DBusDataMap (const TQMap< T, TQT_DBusDataMap< TQT_DBusUnixFd > > &other)
TQT_DBusDataMap< T > & operator= (const TQT_DBusDataMap< T > &other)
TQT_DBusDataMap< T > & operator= (const TQMap< T, TQT_DBusData > &other)
TQT_DBusData::Type keyType () const
TQT_DBusData::Type valueType () const
bool hasContainerValueType () const
TQT_DBusData containerValueType () const
bool isValid () const
bool isEmpty () const
uint count () const
bool operator== (const TQT_DBusDataMap< T > &other) const
void clear ()
const_iterator begin () const
const_iterator end () const
bool insert (const T &key, const TQT_DBusData &data)
TQMap< T, TQT_DBusDatatoTQMap () const
TQMap< T, bool > toBoolMap (bool *ok=0) const
TQMap< T, TQ_UINT8 > toByteMap (bool *ok=0) const
TQMap< T, TQ_INT16 > toInt16Map (bool *ok=0) const
TQMap< T, TQ_UINT16 > toUInt16Map (bool *ok=0) const
TQMap< T, TQ_INT32 > toInt32Map (bool *ok=0) const
TQMap< T, TQ_UINT32 > toUInt32Map (bool *ok=0) const
TQMap< T, TQ_INT64 > toInt64Map (bool *ok=0) const
TQMap< T, TQ_UINT64 > toUInt64Map (bool *ok=0) const
TQMap< T, double > toDoubleMap (bool *ok=0) const
TQMap< T, TQString > toStringMap (bool *ok=0) const
TQMap< T, TQT_DBusObjectPathtoObjectPathMap (bool *ok=0) const
TQMap< T, TQT_DBusObjectPathtoUnixFdMap (bool *ok=0) const
TQMap< T, TQT_DBusVarianttoVariantMap (bool *ok=0) const

Private Member Functions

template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType
template<>
const TQT_DBusData::Type m_keyType

Private Attributes

TQT_DBusData::Type m_valueType
TQT_DBusData m_containerValueType

Static Private Attributes

static const TQT_DBusData::Type m_keyType

Friends

class TQT_DBusData

Detailed Description

template<typename T>
class TQT_DBusDataMap< T >

Class to transport maps of D-Bus data types.

Note:
while the D-Bus data type is actually called dict this bindings use the term map since TQT_DBusDataMap is essentially a TQMap

There are basically two ways to create TQT_DBusDataMap objects:

  • non-empty from content
  • empty by specifying the desired element type

Example for creating a filled map from content

 TQMap<TQ_INT16, TQString> intToStringMap;
 map.insert(2, "two");
 map.insert(3, "three");
 map.insert(5, "five");
 map.insert(7, "seven");

 TQT_DBusDataMap<TQ_INT16> dbusMap(intToStringMap);
 TQT_DBusData data = TQT_DBusData::fromInt16KeyMap(dbusMap);

 // or even shorter, using implicit conversion
 TQT_DBusData other = TQT_DBusData::fromInt16KeyMap(intList);

Example for creating an empty map

 // empty map for a simple type, mapping from TQString to double
 TQT_DBusDataMap<TQString> list(TQT_DBusData::Double);

 // empty map for value type string lists
 TQT_DBusData valueType = TQT_DBusData::fromList(TQT_DBusDataList(TQT_DBusData::String));
 TQT_DBusDataMap<TQString> map(valueType);
See also:
TQT_DBusDataList

Definition at line 73 of file tqdbusdatamap.h.


Member Typedef Documentation

template<typename T>
typedef TQMapConstIterator<T, TQT_DBusData> TQT_DBusDataMap< T >::const_iterator

Constant iterator. A TQMapConstIterator with value type specified as TQT_DBusData

Definition at line 82 of file tqdbusdatamap.h.


Constructor & Destructor Documentation

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( ) [inline]

Creates an empty and invalid map.

See also:
TQT_DBusData::Invalid

Definition at line 89 of file tqdbusdatamap.h.

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Invalid) {}
template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( TQT_DBusData::Type  simpleValueType) [inline, explicit]

Creates an empty map with the given simple type for values.

The given type has be one of the non-container types, i.e. any other than TQT_DBusData::Map, TQT_DBusData::List or TQT_DBusData::Struct

For creating a map with elements which are containers themselves, use TQT_DBusDataMap<T>(const TQT_DBusData&);

Parameters:
simpleValueTypethe type of the values in the new map

Definition at line 103 of file tqdbusdatamap.h.

        : TQMap<T, TQT_DBusData>(), m_valueType(simpleValueType) {}
template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQT_DBusData containerValueType) [inline, explicit]

Creates an empty map with the given container type for values.

For creating a map with simple values you can also use TQT_DBusDataMap<T>(TQT_DBusData::Type);

Parameters:
containerValueTypethe type of the values in the new map
See also:
hasContainerValueType()

Definition at line 116 of file tqdbusdatamap.h.

        : TQMap<T, TQT_DBusData>(), m_valueType(containerValueType.type())
    {
        if (hasContainerValueType()) m_containerValueType = containerValueType;
    }
template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQT_DBusDataMap< T > &  other) [inline]

Creates a map from the given other map.

This behaves basically like copying a TQMap through its copy constructor, i.e. no value are actually copied at this time.

Parameters:
otherthe other map object to copy from

Definition at line 130 of file tqdbusdatamap.h.

        : TQMap<T, TQT_DBusData>(other), m_valueType(other.m_valueType),
          m_containerValueType(other.m_containerValueType) {}
template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusData > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusData objects.

If the other map is empty, this will behave like TQT_DBusDataMap<T>(), i.e. create an empty and invalid map object.

Type information for the map object, i.e. value type and, if applicable, container value type, will be derived from the other map's elements.

Warning:
if the values of the other map do not all have the same type, the map object will also be empty and invalid
Parameters:
otherthe TQMap of TQT_DBusData objects to copy from
See also:
toTQMap()

Definition at line 150 of file tqdbusdatamap.h.

References TQT_DBusData::Invalid, and TQT_DBusData::TQT_DBusData().

        : TQMap<T, TQT_DBusData>(other), m_valueType(TQT_DBusData::Invalid)
    {
        const_iterator it = begin();
        if (it == end()) return;

        m_valueType = (*it).type();

        TQCString containerSignature;
        if (hasContainerValueType())
        {
            m_containerValueType = it.data();
            containerSignature = m_containerValueType.buildDBusSignature();
        }

        for (++it; it != end(); ++it)
        {
            if ((*it).type() != m_valueType)
            {
                m_valueType = TQT_DBusData::Invalid;
                m_containerValueType = TQT_DBusData();

                clear();
                return;
            }
            else if (hasContainerValueType())
            {
                if (it.data().buildDBusSignature() != containerSignature)
                {
                    m_valueType = TQT_DBusData::Invalid;
                    m_containerValueType = TQT_DBusData();

                    clear();
                    return;
                }
            }
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, bool > &  other) [inline]

Creates a list from the given TQMap of boolean values.

Type information for the map object will be set to TQT_DBusData::Bool also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Bool

Parameters:
otherthe TQMap of boolean values to copy from
See also:
toBoolMap()

Definition at line 201 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromBool().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Bool)
    {
        typename TQMap<T, bool>::const_iterator it    = other.begin();
        typename TQMap<T, bool>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromBool(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_UINT8 > &  other) [inline]

Creates a map from the given TQMap of byte (unsigned char) values.

Type information for the map object will be set to TQT_DBusData::Byte also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Byte

Parameters:
otherthe TQMap of byte (unsigned char) values to copy from
See also:
toByteMap()

Definition at line 224 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromByte().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Byte)
    {
        typename TQMap<T, TQ_UINT8>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_UINT8>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromByte(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_INT16 > &  other) [inline]

Creates a map from the given TQMap of signed 16-bit integer values.

Type information for the map object will be set to TQT_DBusData::Int16 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Int16

Parameters:
otherthe TQMap of signed 16-bit integer values to copy from
See also:
toInt16Map()

Definition at line 247 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromInt16().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Int16)
    {
        typename TQMap<T, TQ_INT16>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_INT16>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromInt16(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_UINT16 > &  other) [inline]

Creates a map from the given TQMap of unsigned 16-bit integer values.

Type information for the map object will be set to TQT_DBusData::UInt16 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::UInt16

Parameters:
otherthe TQMap of unsigned 16-bit integer values to copy from
See also:
toUInt16Map()

Definition at line 270 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUInt16().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::UInt16)
    {
        typename TQMap<T, TQ_UINT16>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_UINT16>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromUInt16(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_INT32 > &  other) [inline]

Creates a map from the given TQMap of signed 32-bit integer values.

Type information for the map object will be set to TQT_DBusData::Int32 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Int32

Parameters:
otherthe TQMap of signed 32-bit integer values to copy from
See also:
toInt32Map()

Definition at line 293 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromInt32().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Int32)
    {
        typename TQMap<T, TQ_INT32>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_INT32>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromInt32(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_UINT32 > &  other) [inline]

Creates a map from the given TQMap of unsigned 32-bit integer values.

Type information for the map object will be set to TQT_DBusData::UInt16 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::UInt32

Parameters:
otherthe TQMap of unsigned 32-bit integer values to copy from
See also:
toUInt32Map()

Definition at line 316 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUInt32().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::UInt32)
    {
        typename TQMap<T, TQ_UINT32>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_UINT32>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromUInt32(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_INT64 > &  other) [inline]

Creates a map from the given TQMap of signed 64-bit integer values.

Type information for the map object will be set to TQT_DBusData::Int64 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Int64

Parameters:
otherthe TQMap of signed 64-bit integer values to copy from
See also:
toInt64Map()

Definition at line 339 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromInt64().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Int64)
    {
        typename TQMap<T, TQ_INT64>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_INT64>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromInt64(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQ_UINT64 > &  other) [inline]

Creates a map from the given TQMap of unsigned 64-bit integer values.

Type information for the map object will be set to TQT_DBusData::UInt64 also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::UInt64

Parameters:
otherthe TQMap of unsigned 64-bit integer values to copy from
See also:
toUInt64Map()

Definition at line 362 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUInt64().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::UInt64)
    {
        typename TQMap<T, TQ_UINT64>::const_iterator it    = other.begin();
        typename TQMap<T, TQ_UINT64>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromUInt64(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, double > &  other) [inline]

Creates a map from the given TQMap of double values.

Type information for the map object will be set to TQT_DBusData::Double also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Double

Parameters:
otherthe TQMap of double values to copy from
See also:
toDoubleMap()

Definition at line 385 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromDouble().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Double)
    {
        typename TQMap<T, double>::const_iterator it    = other.begin();
        typename TQMap<T, double>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromDouble(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQString > &  other) [inline]

Creates a map from the given TQMap of TQString values.

Type information for the map object will be set to TQT_DBusData::String also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::String

Parameters:
otherthe TQMap of TQString values to copy from
See also:
toStringMap()

Definition at line 408 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromString().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::String)
    {
        typename TQMap<T, TQString>::const_iterator it    = other.begin();
        typename TQMap<T, TQString>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromString(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusObjectPath > &  other) [inline]

Creates a map from the given TQMap of object path values.

Type information for the map object will be set to TQT_DBusData::ObjectPath also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::ObjectPath

Parameters:
otherthe TQMap of object path values to copy from
See also:
toObjectPathMap()

Definition at line 431 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromObjectPath().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::ObjectPath)
    {
        typename TQMap<T, TQT_DBusObjectPath>::const_iterator it    = other.begin();
        typename TQMap<T, TQT_DBusObjectPath>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromObjectPath(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusUnixFd > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusUnixFd values.

Type information for the map object will be set to TQT_DBusData::UnixFd also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::UnixFd

Parameters:
otherthe TQMap of TQT_DBusUnixFd values to copy from
See also:
toUnixFdMap()

Definition at line 454 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUnixFd().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::UnixFd)
    {
        typename TQMap<T, TQT_DBusUnixFd>::const_iterator it    = other.begin();
        typename TQMap<T, TQT_DBusUnixFd>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromUnixFd(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusVariant > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusVariant values.

Type information for the map object will be set to TQT_DBusData::Variant also when the other map is empty, i.e. this allows to create an empty but valid map object, comparable to using TQT_DBusDataMap<T>(TQT_DBusData::Type) with TQT_DBusData::Variant

Parameters:
otherthe TQMap of variant values to copy from
See also:
toVariantMap()

Definition at line 477 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromVariant().

        : TQMap<T, TQT_DBusData>(), m_valueType(TQT_DBusData::Variant)
    {
        typename TQMap<T, TQT_DBusVariant>::const_iterator it    = other.begin();
        typename TQMap<T, TQT_DBusVariant>::const_iterator endIt = other.end();
        for (; it != endIt; ++it)
        {
            insert(it.key(), TQT_DBusData::fromVariant(it.data()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_UINT8 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT8> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_UINT8> values to copy from

Definition at line 493 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromByteKeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_INT16 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_INT16> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_INT16> values to copy from

Definition at line 509 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromInt16KeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_UINT16 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT16> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_UINT16> values to copy from

Definition at line 525 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUInt16KeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_INT32 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_INT32> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_INT32> values to copy from

Definition at line 541 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromInt32KeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_UINT32 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT32> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_UINT32> values to copy from

Definition at line 557 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUInt32KeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_INT64 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_INT64> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_INT64> values to copy from

Definition at line 573 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromInt64KeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQ_UINT64 > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQ_UINT64> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQ_UINT64> values to copy from

Definition at line 589 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUInt64KeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQString > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQString> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQString> values to copy from

Definition at line 605 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromStringKeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQT_DBusObjectPath > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQT_DBusObjectPath> values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQT_DBusObjectPath> values to copy from

Definition at line 621 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromObjectPathKeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap< T >::TQT_DBusDataMap ( const TQMap< T, TQT_DBusDataMap< TQT_DBusUnixFd > > &  other) [inline]

Creates a map from the given TQMap of TQT_DBusDataMap<TQT_DBusUnixFd > values.

Parameters:
otherthe TQMap of TQT_DBusDataMap<TQT_DBusUnixFd > values to copy from

Definition at line 637 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), and TQT_DBusData::fromUnixFdKeyMap().

        : 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()));
        }
    }

+ Here is the call graph for this function:


Member Function Documentation

template<typename T>
const_iterator TQT_DBusDataMap< T >::begin ( ) const [inline]

Returns an iterator to the first item according to the key sort order.

See also:
TQMap::begin()

Definition at line 862 of file tqdbusdatamap.h.

+ Here is the caller graph for this function:

template<typename T>
void TQT_DBusDataMap< T >::clear ( ) [inline]

Clears the map.

Value type and, if applicable, container value type will stay untouched.

Definition at line 855 of file tqdbusdatamap.h.

template<typename T>
TQT_DBusData TQT_DBusDataMap< T >::containerValueType ( ) const [inline]

Returns a container prototype for the map's value type.

Lists which have containers as their elements, i.e. hasContainerValueType() returns true this will actually specify the details for the use container, i.e. the returned data object can be queried for type and possible further subtypes.

Returns:
a data object detailing the value type or an invalid data object if the map does not have a container as its element type
See also:
TQT_DBusDataMap<T>(const TQT_DBusData&);
valueType()
TQT_DBusData::Invalid

Definition at line 782 of file tqdbusdatamap.h.

+ Here is the caller graph for this function:

template<typename T>
uint TQT_DBusDataMap< T >::count ( ) const [inline]

Returns the number of key/value pairs of this map object.

Returns:
the number of key/value pairs
See also:
isEmpty()

Definition at line 809 of file tqdbusdatamap.h.

+ Here is the caller graph for this function:

template<typename T>
const_iterator TQT_DBusDataMap< T >::end ( ) const [inline]

Returns an iterator to an invalid position.

See also:
TQMap::end()

Definition at line 872 of file tqdbusdatamap.h.

+ Here is the caller graph for this function:

template<typename T>
bool TQT_DBusDataMap< T >::hasContainerValueType ( ) const [inline]

Checks whether the value type is a data container itself.

If the value of the map are containers as well, this will return true In this case containerValueType() will return a prototype for such a container.

Returns:
true if the value type is either TQT_DBusData::Map, TQT_DBusData::List or TQT_DBusData::Struct, otherwise false
See also:
TQT_DBusDataMap<T>(const TQT_DBusData&)

Definition at line 761 of file tqdbusdatamap.h.

References TQT_DBusData::List, TQT_DBusData::Map, and TQT_DBusData::Struct.

+ Here is the caller graph for this function:

template<typename T>
bool TQT_DBusDataMap< T >::insert ( const T &  key,
const TQT_DBusData data 
) [inline]

Inserts a given value for a given key.

Basically works like the respective TQMap method, but checks if type of the new value matches the value type of the list. Maps that are invalid will accept any new type and will then be typed accordingly.

If data is invalid itself, it will not be inserted at any time.

Note:
the more common use case is to work with a TQMap and then use the respective constructor to create the TQT_DBusDataMap object
Parameters:
keythe key were to insert into the map
datathe data item to insert into the map
Returns:
true on successfull insert, otherwise false

Definition at line 895 of file tqdbusdatamap.h.

References TQT_DBusData::buildDBusSignature(), TQT_DBusData::Invalid, TQT_DBusData::type(), and TQT_DBusData::typeName().

    {
        if (data.type() == TQT_DBusData::Invalid) return false;

        if (m_valueType == TQT_DBusData::Invalid)
        {
            m_valueType = data.type();

            // TODO: create empty copy of container
            if (hasContainerValueType()) m_containerValueType = data;

            TQMap<T, TQT_DBusData>::insert(key, data);
        }
        else if (data.type() != m_valueType)
        {
            tqWarning("TQT_DBusDataMap: trying to add data of type %s to map of type %s",
                     data.typeName(), TQT_DBusData::typeName(m_valueType));
        }
        else if (hasContainerValueType())
        {
            TQCString ourSignature  = m_containerValueType.buildDBusSignature();
            TQCString dataSignature = data.buildDBusSignature();

            if (ourSignature != dataSignature)
            {
                tqWarning("TQT_DBusDataMap: trying to add data with signature %s "
                        "to map with value signature %s",
                        dataSignature.data(), ourSignature.data());
            }
            else
                TQMap<T, TQT_DBusData>::insert(key, data);
        }
        else
            TQMap<T, TQT_DBusData>::insert(key, data);

        return true;
    }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<typename T>
bool TQT_DBusDataMap< T >::isEmpty ( ) const [inline]

Checks whether this map object has any key/value pairs.

Returns:
true if there are no key/values in this map, otherwise false
See also:
count()

Definition at line 800 of file tqdbusdatamap.h.

{ return TQMap<T, TQT_DBusData>::empty(); }
template<typename T>
bool TQT_DBusDataMap< T >::isValid ( ) const [inline]

Checks whether this map object has a valid value type.

This is equal to checking valueType() for not being TQT_DBusData::Invalid

Returns:
true if the map object is valid, otherwise false

Definition at line 791 of file tqdbusdatamap.h.

References TQT_DBusData::Invalid.

template<typename T>
TQT_DBusData::Type TQT_DBusDataMap< T >::keyType ( ) const [inline]

Returns the key type of the map object.

Returns:
one of the values of the TQT_DBusData::Type enum suitable for map keys. See TQT_DBusData::Map for details
See also:
valueType()

Definition at line 735 of file tqdbusdatamap.h.

{ return m_keyType; }

+ Here is the caller graph for this function:

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_UINT8 >::m_keyType ( ) [private]

Definition at line 146 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_INT16 >::m_keyType ( ) [private]

Definition at line 149 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_UINT16 >::m_keyType ( ) [private]

Definition at line 152 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_INT32 >::m_keyType ( ) [private]

Definition at line 155 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_UINT32 >::m_keyType ( ) [private]

Definition at line 158 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_INT64 >::m_keyType ( ) [private]

Definition at line 161 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQ_UINT64 >::m_keyType ( ) [private]

Definition at line 164 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQString >::m_keyType ( ) [private]

Definition at line 167 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQT_DBusObjectPath >::m_keyType ( ) [private]

Definition at line 170 of file tqdbusdata.cpp.

template<>
const TQT_DBusData::Type TQT_DBusDataMap< TQT_DBusUnixFd >::m_keyType ( ) [private]

Definition at line 173 of file tqdbusdata.cpp.

template<typename T>
TQT_DBusDataMap<T>& TQT_DBusDataMap< T >::operator= ( const TQT_DBusDataMap< T > &  other) [inline]

Copies from the given other map.

This behaves basically like copying a TQMap through its assignment operator, i.e. no value are actually copied at this time.

Parameters:
otherthe other map object to copy from
Returns:
a reference to this map object

Definition at line 658 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::m_containerValueType, TQT_DBusDataMap< T >::m_valueType, and TQT_DBusData::operator=().

+ Here is the call graph for this function:

template<typename T>
TQT_DBusDataMap<T>& TQT_DBusDataMap< T >::operator= ( const TQMap< T, TQT_DBusData > &  other) [inline]

Copies from the given other map.

This behaves basically like copying a TQMap through its assignment operator, i.e. no value are actually copied at this time.

Warning:
the value of the given other map have to be of the same type. If they aren't this maps's content will cleared and the value type will be set to TQT_DBusData::Invalid
Parameters:
otherthe other map object to copy from
Returns:
a reference to this map object

Definition at line 682 of file tqdbusdatamap.h.

References TQT_DBusData::Invalid, TQT_DBusData::operator=(), and TQT_DBusData::TQT_DBusData().

    {
        TQMap<T, TQT_DBusData>::operator=(other);

        m_valueType = TQT_DBusData::Invalid;
        m_containerValueType = TQT_DBusData();

        const_iterator it = begin();
        if (it == end()) return *this;

        m_valueType = (*it).type();

        TQCString containerSignature;
        if (hasContainerValueType())
        {
            m_containerValueType = it.data();
            containerSignature = m_containerValueType.buildDBusSignature();
        }

        for (++it; it != end(); ++it)
        {
            if ((*it).type() != m_valueType)
            {
                m_valueType = TQT_DBusData::Invalid;
                m_containerValueType = TQT_DBusData();

                clear();
                return *this;
            }
            else if (hasContainerValueType())
            {
                if (it.data()->buildSignature() != containerSignature)
                {
                    m_valueType = TQT_DBusData::Invalid;
                    m_containerValueType = TQT_DBusData();

                    clear();
                    return *this;
                }
            }
        }

        return *this;
    }

+ Here is the call graph for this function:

template<typename T>
bool TQT_DBusDataMap< T >::operator== ( const TQT_DBusDataMap< T > &  other) const [inline]

Checks whether the given other map is equal to this one.

Two maps are considered equal when they have the same value type (and same container value type if the have one) and the key/value pairs are equal as well.

Parameters:
otherthe other map object to compare with
Returns:
true if the maps are equal, otherwise false
See also:
TQT_DBusData::operator==()

Definition at line 824 of file tqdbusdatamap.h.

References TQT_DBusDataMap< T >::begin(), TQT_DBusData::buildDBusSignature(), TQT_DBusDataMap< T >::count(), TQT_DBusDataMap< T >::end(), TQT_DBusDataMap< T >::hasContainerValueType(), TQT_DBusDataMap< T >::m_containerValueType, and TQT_DBusDataMap< T >::m_valueType.

    {
        if (m_valueType != other.m_valueType) return false;

        if (count() != other.count()) return false;

        if (hasContainerValueType() != other.hasContainerValueType()) return false;

        if (hasContainerValueType())
        {
            if (m_containerValueType.buildDBusSignature() !=
                other.m_containerValueType.buildDBusSignature()) return false;
        }

        const_iterator it = begin();
        const_iterator otherIt = other.begin();
        for (; it != end() && otherIt != other.end(); ++it, ++otherIt)
        {
            if (it.key() != otherIt.key()) return false;

            if (!(it.data() == otherIt.data())) return false;
        }

        return true;
    }

+ Here is the call graph for this function:

template<typename T>
TQMap<T, bool> TQT_DBusDataMap< T >::toBoolMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of bool.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Bool.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Bool)
Returns:
a TQMap of bool containing the list object's boolean values or an empty map when converting fails
See also:
TQT_DBusData::toBool()

Definition at line 956 of file tqdbusdatamap.h.

References TQT_DBusData::Bool.

    {
        if (m_valueType != TQT_DBusData::Bool)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, bool>();
        }

        TQMap<T, bool> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toBool());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQ_UINT8> TQT_DBusDataMap< T >::toByteMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_UINT8.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Byte.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Byte)
Returns:
a TQMap of TQ_UINT8 containing the list object's byte values or an empty map when converting fails
See also:
TQT_DBusData::toBool()

Definition at line 994 of file tqdbusdatamap.h.

References TQT_DBusData::Byte.

    {
        if (m_valueType != TQT_DBusData::Byte)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_UINT8>();
        }

        TQMap<T, TQ_UINT8> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toByte());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, double> TQT_DBusDataMap< T >::toDoubleMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of double.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Double.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Double)
Returns:
a TQMap of double containing the map object's double values or an empty map when converting fails
See also:
TQT_DBusData::toDouble()

Definition at line 1266 of file tqdbusdatamap.h.

References TQT_DBusData::Double.

    {
        if (m_valueType != TQT_DBusData::Double)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, double>();
        }

        TQMap<T, double> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toDouble());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQ_INT16> TQT_DBusDataMap< T >::toInt16Map ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_INT16.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Int16.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Int16)
Returns:
a TQMap of TQ_INT16 containing the map object's signed 16-bit integer values or an empty map when converting fails
See also:
TQT_DBusData::toInt16()

Definition at line 1033 of file tqdbusdatamap.h.

References TQT_DBusData::Int16.

    {
        if (m_valueType != TQT_DBusData::Int16)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_INT16>();
        }

        TQMap<T, TQ_INT16> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toInt16());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQ_INT32> TQT_DBusDataMap< T >::toInt32Map ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_INT32.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Int32.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Int32)
Returns:
a TQMap of TQ_INT32 containing the map object's signed 32-bit integer values or an empty map when converting fails
See also:
TQT_DBusData::toInt32()

Definition at line 1111 of file tqdbusdatamap.h.

References TQT_DBusData::Int32.

    {
        if (m_valueType != TQT_DBusData::Int32)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_INT32>();
        }

        TQMap<T, TQ_INT32> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toInt32());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQ_INT64> TQT_DBusDataMap< T >::toInt64Map ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_INT64.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Int64.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Int64)
Returns:
a TQMap of TQ_INT64 containing the map object's signed 64-bit integer values or an empty map when converting fails
See also:
TQT_DBusData::toInt64()

Definition at line 1189 of file tqdbusdatamap.h.

References TQT_DBusData::Int64.

    {
        if (m_valueType != TQT_DBusData::Int64)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_INT64>();
        }

        TQMap<T, TQ_INT64> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toInt64());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQT_DBusObjectPath> TQT_DBusDataMap< T >::toObjectPathMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of object paths.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::ObjectPath)
Returns:
a TQMap of object paths containing the map object's object path values or an empty map when converting fails
See also:
TQT_DBusData::toObjectPath()

Definition at line 1339 of file tqdbusdatamap.h.

References TQT_DBusData::ObjectPath.

    {
        if (m_valueType != TQT_DBusData::ObjectPath)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQT_DBusObjectPath>();
        }

        TQMap<T, TQT_DBusObjectPath> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toObjectPath());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQString> TQT_DBusDataMap< T >::toStringMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQString.

This is a convenience overload for the case when the map is of value type TQT_DBusData::String, see also toTQStringList().

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::String)
Returns:
a TQMap of TQString containing the map object's string values or an empty map when converting fails
See also:
TQT_DBusData::toString()

Definition at line 1304 of file tqdbusdatamap.h.

References TQT_DBusData::String.

    {
        if (m_valueType != TQT_DBusData::String)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQString>();
        }

        TQMap<T, TQString> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toString());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQT_DBusData> TQT_DBusDataMap< T >::toTQMap ( ) const [inline]

Converts the map object into a TQMap with TQT_DBusData elements.

Returns:
the key/value pairs of the map object as a TQMap

Definition at line 938 of file tqdbusdatamap.h.

{ return *this; }
template<typename T>
TQMap<T, TQ_UINT16> TQT_DBusDataMap< T >::toUInt16Map ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_UINT16.

This is a convenience overload for the case when the map is of value type TQT_DBusData::UInt16.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::UInt16)
Returns:
a TQMap of TQ_UINT16 containing the map object's unsigned 16-bit integer values or an empty map when converting fails
See also:
TQT_DBusData::toUInt16()

Definition at line 1072 of file tqdbusdatamap.h.

References TQT_DBusData::UInt16.

    {
        if (m_valueType != TQT_DBusData::UInt16)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_UINT16>();
        }

        TQMap<T, TQ_UINT16> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toUInt16());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQ_UINT32> TQT_DBusDataMap< T >::toUInt32Map ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_UINT32.

This is a convenience overload for the case when the map is of value type TQT_DBusData::UInt32.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::UInt32)
Returns:
a TQMap of TQ_UINT32 containing the map object's unsigned 32-bit integer values or an empty map when converting fails
See also:
TQT_DBusData::toUInt32()

Definition at line 1150 of file tqdbusdatamap.h.

References TQT_DBusData::UInt32.

    {
        if (m_valueType != TQT_DBusData::UInt32)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_UINT32>();
        }

        TQMap<T, TQ_UINT32> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toUInt32());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQ_UINT64> TQT_DBusDataMap< T >::toUInt64Map ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQ_UINT64.

This is a convenience overload for the case when the map is of value type TQT_DBusData::UInt64.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::UInt64)
Returns:
a TQMap of TQ_UINT64 containing the map object's unsigned 64-bit integer values or an empty map when converting fails
See also:
TQT_DBusData::toUInt64()

Definition at line 1228 of file tqdbusdatamap.h.

References TQT_DBusData::UInt64.

    {
        if (m_valueType != TQT_DBusData::UInt64)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQ_UINT64>();
        }

        TQMap<T, TQ_UINT64> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toUInt64());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQT_DBusObjectPath> TQT_DBusDataMap< T >::toUnixFdMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQT_DBusUnixFd.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::UnixFd)
Returns:
a TQMap of TQT_DBusUnixFd containing the map object's TQT_DBusUnixFd values or an empty map when converting fails
See also:
TQT_DBusData::toUnixFd()

Definition at line 1374 of file tqdbusdatamap.h.

References TQT_DBusData::UnixFd.

    {
        if (m_valueType != TQT_DBusData::UnixFd)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQT_DBusUnixFd>();
        }

        TQMap<T, TQT_DBusUnixFd> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toUnixFd());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQMap<T, TQT_DBusVariant> TQT_DBusDataMap< T >::toVariantMap ( bool *  ok = 0) const [inline]

Tries to get the map object's pairs as a TQMap of TQT_DBusVariant.

This is a convenience overload for the case when the map is of value type TQT_DBusData::Variant.

Parameters:
okoptional pointer to a bool variable to store the success information in, i.e. will be set to true on success and to false if the conversion failed (not of value type TQT_DBusData::Variant)
Returns:
a TQMap of TQT_DBusVariant containing the map object's TQT_DBusVariant values or an empty map when converting fails
See also:
TQT_DBusData::toVariant()

Definition at line 1412 of file tqdbusdatamap.h.

References TQT_DBusData::Variant.

    {
        if (m_valueType != TQT_DBusData::Variant)
        {
            if (ok != 0) *ok = false;
            return TQMap<T, TQT_DBusVariant>();
        }

        TQMap<T, TQT_DBusVariant> result;

        const_iterator it    = begin();
        const_iterator endIt = end();
        for (; it != endIt; ++it)
        {
            result.insert(it.key(), (*it).toVariant());
        }

        if (ok != 0) *ok = true;

        return result;
    }
template<typename T>
TQT_DBusData::Type TQT_DBusDataMap< T >::valueType ( ) const [inline]

Returns the value type of the map object.

Returns:
one of the values of the TQT_DBusData::Type enum
See also:
hasContainerValueType()
containerValueType()
keyType()

Definition at line 746 of file tqdbusdatamap.h.

{ return m_valueType; }

+ Here is the caller graph for this function:


Friends And Related Function Documentation

template<typename T>
friend class TQT_DBusData [friend]

Definition at line 75 of file tqdbusdatamap.h.


Member Data Documentation

template<typename T>
TQT_DBusData TQT_DBusDataMap< T >::m_containerValueType [private]

Definition at line 1436 of file tqdbusdatamap.h.

template<typename T>
const TQT_DBusData::Type TQT_DBusDataMap< T >::m_keyType [static, private]

Definition at line 1438 of file tqdbusdatamap.h.

template<typename T>
TQT_DBusData::Type TQT_DBusDataMap< T >::m_valueType [private]

Definition at line 1435 of file tqdbusdatamap.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines