KIMAP::ImapInterval
#include <imapset.h>
Public Types | |
using | Id = qint64 |
using | List = QList<ImapInterval> |
Public Member Functions | |
ImapInterval () | |
ImapInterval (const ImapInterval &other) | |
ImapInterval (Id begin, Id end=0) | |
~ImapInterval () | |
Id | begin () const |
Id | end () const |
bool | hasDefinedBegin () const |
bool | hasDefinedEnd () const |
ImapInterval & | operator= (const ImapInterval &other) |
bool | operator== (const ImapInterval &other) const |
void | setBegin (Id value) |
void | setEnd (Id value) |
Id | size () const |
QByteArray | toImapSequence () const |
Static Public Member Functions | |
static ImapInterval | fromImapSequence (const QByteArray &sequence) |
Detailed Description
Represents a single interval in an ImapSet.
This class is implicitly shared.
Member Typedef Documentation
◆ Id
using KIMAP::ImapInterval::Id = qint64 |
◆ List
using KIMAP::ImapInterval::List = QList<ImapInterval> |
A list of ImapInterval objects.
Constructor & Destructor Documentation
◆ ImapInterval() [1/3]
ImapInterval::ImapInterval | ( | ) |
Constructs an interval that covers all positive numbers.
Definition at line 50 of file imapset.cpp.
◆ ImapInterval() [2/3]
ImapInterval::ImapInterval | ( | const ImapInterval & | other | ) |
Copy constructor.
Definition at line 55 of file imapset.cpp.
◆ ImapInterval() [3/3]
Create a new interval.
- Parameters
-
begin The begin of the interval. end Keep default (0) to just set the interval begin
Definition at line 60 of file imapset.cpp.
◆ ~ImapInterval()
ImapInterval::~ImapInterval | ( | ) |
Destructor.
Definition at line 67 of file imapset.cpp.
Member Function Documentation
◆ begin()
ImapInterval::Id ImapInterval::begin | ( | ) | const |
Returns the begin of this interval.
The value is the smallest value part of the interval. Only valid if begin is defined.
Definition at line 100 of file imapset.cpp.
◆ end()
ImapInterval::Id ImapInterval::end | ( | ) | const |
Returns the end of this interval.
This value is the largest value part of the interval. Only valid if hasDefinedEnd() returned true.
Definition at line 110 of file imapset.cpp.
◆ fromImapSequence()
|
static |
Return the interval corresponding to the given IMAP-compatible QByteArray representation.
Definition at line 149 of file imapset.cpp.
◆ hasDefinedBegin()
bool ImapInterval::hasDefinedBegin | ( | ) | const |
Returns true if this interval has a defined begin.
Definition at line 95 of file imapset.cpp.
◆ hasDefinedEnd()
bool ImapInterval::hasDefinedEnd | ( | ) | const |
Returns true if this intercal has been defined.
Definition at line 105 of file imapset.cpp.
◆ operator=()
ImapInterval & ImapInterval::operator= | ( | const ImapInterval & | other | ) |
Assignment operator.
Definition at line 71 of file imapset.cpp.
◆ operator==()
bool ImapInterval::operator== | ( | const ImapInterval & | other | ) | const |
Comparison operator.
Definition at line 79 of file imapset.cpp.
◆ setBegin()
void ImapInterval::setBegin | ( | Id | value | ) |
Sets the begin of the interval.
Definition at line 118 of file imapset.cpp.
◆ setEnd()
void ImapInterval::setEnd | ( | Id | value | ) |
Sets the end of this interval.
Definition at line 125 of file imapset.cpp.
◆ size()
ImapInterval::Id ImapInterval::size | ( | ) | const |
Returns the size of this interval.
Size is only defined for finite intervals.
Definition at line 84 of file imapset.cpp.
◆ toImapSequence()
|
nodiscard |
Converts this set into an IMAP compatible sequence.
Definition at line 132 of file imapset.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:51:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.