KIMAP::ImapSet
#include <imapset.h>
Public Types | |
using | Id = qint64 |
Public Member Functions | |
ImapSet () | |
ImapSet (const ImapSet &other) | |
ImapSet (Id begin, Id end) | |
ImapSet (Id value) | |
~ImapSet () | |
void | add (const ImapInterval &interval) |
void | add (const QList< Id > &values) |
void | add (Id value) |
ImapInterval::List | intervals () const |
bool | isEmpty () const |
ImapSet & | operator= (const ImapSet &other) |
bool | operator== (const ImapSet &other) const |
void | optimize () |
QByteArray | toImapSequenceSet () const |
Static Public Member Functions | |
static ImapSet | fromImapSequenceSet (const QByteArray &sequence) |
Detailed Description
Represents a set of natural numbers (1->∞) in a as compact as possible form.
Used to address Akonadi items via the IMAP protocol or in the database. This class is implicitly shared.
Member Typedef Documentation
◆ Id
using KIMAP::ImapSet::Id = qint64 |
Constructor & Destructor Documentation
◆ ImapSet() [1/4]
ImapSet::ImapSet | ( | ) |
Constructs an empty set.
Definition at line 180 of file imapset.cpp.
◆ ImapSet() [2/4]
Constructs a set containing a single interval.
Definition at line 185 of file imapset.cpp.
◆ ImapSet() [3/4]
|
explicit |
Constructs a set containing a single value.
Definition at line 191 of file imapset.cpp.
◆ ImapSet() [4/4]
ImapSet::ImapSet | ( | const ImapSet & | other | ) |
Copy constructor.
Definition at line 197 of file imapset.cpp.
◆ ~ImapSet()
ImapSet::~ImapSet | ( | ) |
Destructor.
Definition at line 202 of file imapset.cpp.
Member Function Documentation
◆ add() [1/3]
void ImapSet::add | ( | const ImapInterval & | interval | ) |
Adds the given ImapInterval to this set.
No interval merging is performed.
- Parameters
-
interval the interval to add
Definition at line 257 of file imapset.cpp.
◆ add() [2/3]
Adds the given list of positive integer numbers to the set.
The list is sorted and split into as large as possible intervals. No interval merging is performed.
- Parameters
-
values List of positive integer numbers in arbitrary order
Definition at line 234 of file imapset.cpp.
◆ add() [3/3]
void ImapSet::add | ( | Id | value | ) |
Adds a single positive integer numbers to the set.
The list is sorted and split into as large as possible intervals. No interval merging is performed.
- Parameters
-
value A positive integer number
Definition at line 229 of file imapset.cpp.
◆ fromImapSequenceSet()
|
static |
Return the set corresponding to the given IMAP-compatible QByteArray representation.
Definition at line 285 of file imapset.cpp.
◆ intervals()
|
nodiscard |
Returns the intervals this set consists of.
Definition at line 300 of file imapset.cpp.
◆ isEmpty()
|
nodiscard |
Returns true if this set doesn't contains any values.
Definition at line 305 of file imapset.cpp.
◆ operator=()
Assignment operator.
Definition at line 206 of file imapset.cpp.
◆ operator==()
bool ImapSet::operator== | ( | const ImapSet & | other | ) | const |
Comparison operator.
Definition at line 214 of file imapset.cpp.
◆ optimize()
void ImapSet::optimize | ( | ) |
Optimizes the ImapSet by sorting and merging overlapping intervals.
Normally you shouldn't need to call this method. KIMAP will make sure to opimize the ImapSet before serializing it to string and sending it to the IMAP server.
Definition at line 310 of file imapset.cpp.
◆ toImapSequenceSet()
|
nodiscard |
Returns a IMAP-compatible QByteArray representation of this set.
Definition at line 262 of file imapset.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.