Home · All Classes · All Namespaces · Modules · Functions · Files |
Helper container for safe management of handle lifetimes. Every handle in a ReferencedHandles container is guaranteed to be valid (and stay valid, as long it's in at least one ReferencedHandles container). More...
#include <TelepathyQt/ReferencedHandles>
Public Types | |
typedef UIntList::const_iterator | const_iterator |
typedef UIntList::ConstIterator | ConstIterator |
typedef UIntList::const_pointer | const_pointer |
typedef UIntList::const_reference | const_reference |
typedef UIntList::difference_type | difference_type |
typedef UIntList::pointer | pointer |
typedef UIntList::reference | reference |
typedef UIntList::size_type | size_type |
typedef UIntList::value_type | value_type |
Public Member Functions | |
ReferencedHandles () | |
ReferencedHandles (const ReferencedHandles &other) | |
~ReferencedHandles () | |
ConnectionPtr | connection () const |
HandleType | handleType () const |
uint | at (int i) const |
uint | back () const |
uint | first () const |
uint | front () const |
uint | last () const |
uint | value (int i, uint defaultValue=0) const |
const_iterator | begin () const |
const_iterator | constBegin () const |
const_iterator | constEnd () const |
const_iterator | end () const |
bool | contains (uint handle) const |
int | count (uint handle) const |
int | count () const |
bool | empty () const |
bool | endsWith (uint handle) const |
int | indexOf (uint handle, int from=0) const |
bool | isEmpty () const |
int | lastIndexOf (uint handle, int from=-1) const |
int | length () const |
ReferencedHandles | mid (int pos, int length=-1) const |
int | size () const |
bool | startsWith (uint handle) const |
void | append (const ReferencedHandles &another) |
void | clear () |
void | move (int from, int to) |
void | pop_back () |
void | pop_front () |
int | removeAll (uint handle) |
void | removeAt (int i) |
void | removeFirst () |
void | removeLast () |
bool | removeOne (uint handle) |
void | swap (int i, int j) |
uint | takeAt (int i) |
uint | takeFirst () |
uint | takeLast () |
bool | operator!= (const ReferencedHandles &another) const |
bool | operator!= (const UIntList &another) const |
ReferencedHandles | operator+ (const ReferencedHandles &another) const |
ReferencedHandles & | operator+= (const ReferencedHandles &another) |
ReferencedHandles & | operator<< (const ReferencedHandles &another) |
ReferencedHandles & | operator= (const ReferencedHandles &another) |
bool | operator== (const ReferencedHandles &another) const |
bool | operator== (const UIntList &list) const |
uint | operator[] (int i) const |
UIntList | toList () const |
QSet< uint > | toSet () const |
std::list< uint > | toStdList () const |
QVector< uint > | toVector () const |
Helper container for safe management of handle lifetimes. Every handle in a ReferencedHandles container is guaranteed to be valid (and stay valid, as long it's in at least one ReferencedHandles container).
The class offers a QList-style API. However, from the mutable operations, only the operations for which the validity guarantees can be preserved are provided. This means no functions which can add an arbitrary handle to the container are included - the only way to add handles to the container is to reference them using Connection::referenceHandles() and appending the resulting ReferenceHandles instance.
ReferencedHandles is a implicitly shared class.
typedef UIntList::const_iterator Tp::ReferencedHandles::const_iterator |
typedef UIntList::ConstIterator Tp::ReferencedHandles::ConstIterator |
typedef UIntList::const_pointer Tp::ReferencedHandles::const_pointer |
typedef UIntList::const_reference Tp::ReferencedHandles::const_reference |
typedef UIntList::difference_type Tp::ReferencedHandles::difference_type |
typedef UIntList::pointer Tp::ReferencedHandles::pointer |
typedef UIntList::reference Tp::ReferencedHandles::reference |
typedef UIntList::size_type Tp::ReferencedHandles::size_type |
typedef UIntList::value_type Tp::ReferencedHandles::value_type |
Tp::ReferencedHandles::ReferencedHandles | ( | ) |
Tp::ReferencedHandles::ReferencedHandles | ( | const ReferencedHandles & | other | ) |
Tp::ReferencedHandles::~ReferencedHandles | ( | ) |
ConnectionPtr Tp::ReferencedHandles::connection | ( | ) | const |
HandleType Tp::ReferencedHandles::handleType | ( | ) | const |
uint Tp::ReferencedHandles::at | ( | int | i | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
uint Tp::ReferencedHandles::value | ( | int | i, |
uint | defaultValue = 0 |
||
) | const |
ReferencedHandles::const_iterator Tp::ReferencedHandles::begin | ( | ) | const |
|
inline |
|
inline |
ReferencedHandles::const_iterator Tp::ReferencedHandles::end | ( | ) | const |
bool Tp::ReferencedHandles::contains | ( | uint | handle | ) | const |
int Tp::ReferencedHandles::count | ( | uint | handle | ) | const |
|
inline |
|
inline |
|
inline |
int Tp::ReferencedHandles::indexOf | ( | uint | handle, |
int | from = 0 |
||
) | const |
bool Tp::ReferencedHandles::isEmpty | ( | ) | const |
int Tp::ReferencedHandles::lastIndexOf | ( | uint | handle, |
int | from = -1 |
||
) | const |
|
inline |
ReferencedHandles Tp::ReferencedHandles::mid | ( | int | pos, |
int | length = -1 |
||
) | const |
int Tp::ReferencedHandles::size | ( | ) | const |
|
inline |
|
inline |
void Tp::ReferencedHandles::clear | ( | ) |
void Tp::ReferencedHandles::move | ( | int | from, |
int | to | ||
) |
|
inline |
|
inline |
int Tp::ReferencedHandles::removeAll | ( | uint | handle | ) |
void Tp::ReferencedHandles::removeAt | ( | int | i | ) |
|
inline |
|
inline |
bool Tp::ReferencedHandles::removeOne | ( | uint | handle | ) |
void Tp::ReferencedHandles::swap | ( | int | i, |
int | j | ||
) |
uint Tp::ReferencedHandles::takeAt | ( | int | i | ) |
|
inline |
|
inline |
|
inline |
|
inline |
ReferencedHandles Tp::ReferencedHandles::operator+ | ( | const ReferencedHandles & | another | ) | const |
|
inline |
|
inline |
ReferencedHandles & Tp::ReferencedHandles::operator= | ( | const ReferencedHandles & | another | ) |
bool Tp::ReferencedHandles::operator== | ( | const ReferencedHandles & | another | ) | const |
bool Tp::ReferencedHandles::operator== | ( | const UIntList & | list | ) | const |
|
inline |
UIntList Tp::ReferencedHandles::toList | ( | ) | const |
|
inline |
|
inline |
|
inline |
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.7 |