kmail
KMMsgList Class Reference
#include <kmmsglist.h>
Detailed Description
An abstraction of an array of pointers to messages.This class represents an array of pointers to message objects. It autoresizes and can load a KMMsgDict object from its contents. It's a pure implementation detail of KMFolderIndex and should not be used by the layers above that.
- Author:
- Stefan Taferner <taferner@kde.org>
Definition at line 37 of file kmmsglist.h.
Public Member Functions | |
KMMsgList (int initialSize=32) | |
~KMMsgList () | |
void | remove (unsigned int idx) |
KMMsgBase * | take (unsigned int idx) |
void | insert (unsigned int idx, KMMsgBase *msg, bool syncDict=true) |
unsigned int | append (KMMsgBase *msg, bool syncDict=true) |
void | clear (bool autoDelete=TRUE, bool syncDict=false) |
bool | resize (unsigned int size) |
bool | reset (unsigned int size) |
void | set (unsigned int idx, KMMsgBase *msg) |
unsigned int | high () const |
unsigned int | count () const |
Protected Member Functions | |
void | rethinkHigh () |
Protected Attributes | |
unsigned int | mHigh |
unsigned int | mCount |
Constructor & Destructor Documentation
|
Constructor with optional initial size.
Definition at line 14 of file kmmsglist.cpp. |
|
Destructor also deletes all messages in the list.
Definition at line 25 of file kmmsglist.cpp. |
Member Function Documentation
|
Append given message after the last used message.
Resizes the array if necessary. Returns index of new position. If Definition at line 131 of file kmmsglist.cpp. |
|
Clear messages.
If autoDelete is set (default) the messages are deleted. The array is not resized. If Definition at line 32 of file kmmsglist.cpp. |
|
Number of messages in the array.
Definition at line 86 of file kmmsglist.h. |
|
Returns first unused index (index of last message plus one).
Definition at line 83 of file kmmsglist.h. |
|
Insert message at given index.
Resizes the array if necessary. If Definition at line 107 of file kmmsglist.cpp. |
|
Remove message at given index without deleting it. Also removes from message dictionary. Definition at line 140 of file kmmsglist.cpp. |
|
Clear the array and resize it to given size. Returns FALSE if memory cannot be allocated. Definition at line 83 of file kmmsglist.cpp. |
|
Resize array and initialize new elements if any. Returns FALSE if memory cannot be allocated. Definition at line 51 of file kmmsglist.cpp. |
|
Set mHigh to proper value.
Definition at line 170 of file kmmsglist.cpp. |
|
Set message at given index. The array is resized if necessary. If there is already a message at the given index this message is *not* deleted. Does not sync the message dictionary. Definition at line 92 of file kmmsglist.cpp. |
|
Returns message at given index and removes it from the list. Also removes from message dictionary. Definition at line 161 of file kmmsglist.cpp. |
The documentation for this class was generated from the following files: