• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KMIME Library

KMime::KAutoDeleteHash

KMime::KAutoDeleteHash< Key, T > Class Template Reference

The KAutoDeleteHash class is a convenience QHash subclass that provides automatic deletion of the values in the destructor. More...

#include <kautodeletehash.h>

Inheritance diagram for KMime::KAutoDeleteHash< Key, T >:

Inheritance graph
[legend]

List of all members.


Public Member Functions

 KAutoDeleteHash (const QHash< Key, T * > &other)
 KAutoDeleteHash ()
 ~KAutoDeleteHash ()

Detailed Description

template<class Key, class T>
class KMime::KAutoDeleteHash< Key, T >

The KAutoDeleteHash class is a convenience QHash subclass that provides automatic deletion of the values in the destructor.

Apart from this KAutoDeleteHash behaves exactly like QHash<Key, T *>.

Since the automatic deletion is restricted to the destruction of the hash you have take care of the deletion of values you remove or replace yourself. To replace a value in the hash by another value use

   delete hash.take( key );
   hash.insert( key, value );
and to remove a value from the hash use
   delete hash.take( key );

Author:
Ingo Klöcker <kloecker@kde.org>

Definition at line 49 of file kautodeletehash.h.


Constructor & Destructor Documentation

template<class Key , class T >
KMime::KAutoDeleteHash< Key, T >::KAutoDeleteHash (  )  [inline]

Constructs an empty hash.

Definition at line 55 of file kautodeletehash.h.

template<class Key , class T >
KMime::KAutoDeleteHash< Key, T >::KAutoDeleteHash ( const QHash< Key, T * > &  other  )  [inline]

Constructs a copy of other (which can be a QHash or a KAutoDeleteHash).

Definition at line 59 of file kautodeletehash.h.

template<class Key , class T >
KMime::KAutoDeleteHash< Key, T >::~KAutoDeleteHash (  )  [inline]

Destroys the hash and deletes all values.

References to the values in the hash and all iterators of this hash become invalid.

Definition at line 65 of file kautodeletehash.h.


The documentation for this class was generated from the following file:
  • kautodeletehash.h

KMIME Library

Skip menu "KMIME Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal