| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Types | Public Member Functions | List of all members
Tp::ReferencedHandles Class Reference
Client-side proxies » Connection proxies

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

## Detailed Description

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.

## Member Typedef Documentation

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

## Constructor & Destructor Documentation

Tp::ReferencedHandles::ReferencedHandles | ( |  | ) |

Tp::ReferencedHandles::ReferencedHandles | ( | const ReferencedHandles & | other | ) |

Tp::ReferencedHandles::~ReferencedHandles | ( |  | ) |

## Member Function Documentation

ConnectionPtr Tp::ReferencedHandles::connection | ( |  | ) | const

HandleType Tp::ReferencedHandles::handleType | ( |  | ) | const

uint Tp::ReferencedHandles::at | ( | int | i | ) | const

uint Tp::ReferencedHandles::back | ( |  | ) | const

inline

uint Tp::ReferencedHandles::first | ( |  | ) | const

inline

uint Tp::ReferencedHandles::front | ( |  | ) | const

inline

uint Tp::ReferencedHandles::last | ( |  | ) | const

inline

uint Tp::ReferencedHandles::value | ( | int | i,
|  | uint | defaultValue = `0`
| ) |  | const

ReferencedHandles::const_iterator Tp::ReferencedHandles::begin | ( |  | ) | const

const_iterator Tp::ReferencedHandles::constBegin | ( |  | ) | const

inline

const_iterator Tp::ReferencedHandles::constEnd | ( |  | ) | const

inline

ReferencedHandles::const_iterator Tp::ReferencedHandles::end | ( |  | ) | const

bool Tp::ReferencedHandles::contains | ( | uint | handle | ) | const

int Tp::ReferencedHandles::count | ( | uint | handle | ) | const

int Tp::ReferencedHandles::count | ( |  | ) | const

inline

bool Tp::ReferencedHandles::empty | ( |  | ) | const

inline

bool Tp::ReferencedHandles::endsWith | ( | uint | handle | ) | const

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

int Tp::ReferencedHandles::length | ( |  | ) | const

inline

ReferencedHandles Tp::ReferencedHandles::mid | ( | int | pos,
|  | int | length = `-1`
| ) |  | const

int Tp::ReferencedHandles::size | ( |  | ) | const

bool Tp::ReferencedHandles::startsWith | ( | uint | handle | ) | const

inline

void Tp::ReferencedHandles::append | ( | const ReferencedHandles & | another | ) |

inline

void Tp::ReferencedHandles::clear | ( |  | ) |

void Tp::ReferencedHandles::move | ( | int | from,
|  | int | to
| ) |  |

void Tp::ReferencedHandles::pop_back | ( |  | ) |

inline

void Tp::ReferencedHandles::pop_front | ( |  | ) |

inline

int Tp::ReferencedHandles::removeAll | ( | uint | handle | ) |

void Tp::ReferencedHandles::removeAt | ( | int | i | ) |

void Tp::ReferencedHandles::removeFirst | ( |  | ) |

inline

void Tp::ReferencedHandles::removeLast | ( |  | ) |

inline

bool Tp::ReferencedHandles::removeOne | ( | uint | handle | ) |

void Tp::ReferencedHandles::swap | ( | int | i,
|  | int | j
| ) |  |

uint Tp::ReferencedHandles::takeAt | ( | int | i | ) |

uint Tp::ReferencedHandles::takeFirst | ( |  | ) |

inline

uint Tp::ReferencedHandles::takeLast | ( |  | ) |

inline

bool Tp::ReferencedHandles::operator!= | ( | const ReferencedHandles & | another | ) | const

inline

bool Tp::ReferencedHandles::operator!= | ( | const UIntList & | another | ) | const

inline

ReferencedHandles Tp::ReferencedHandles::operator+ | ( | const ReferencedHandles & | another | ) | const

ReferencedHandles& Tp::ReferencedHandles::operator+= | ( | const ReferencedHandles & | another | ) |

inline

ReferencedHandles& Tp::ReferencedHandles::operator<< | ( | const ReferencedHandles & | another | ) |

inline

ReferencedHandles & Tp::ReferencedHandles::operator= | ( | const ReferencedHandles & | another | ) |

bool Tp::ReferencedHandles::operator== | ( | const ReferencedHandles & | another | ) | const

bool Tp::ReferencedHandles::operator== | ( | const UIntList & | list | ) | const

uint Tp::ReferencedHandles::operator[] | ( | int | i | ) | const

inline

UIntList Tp::ReferencedHandles::toList | ( |  | ) | const

QSet<uint> Tp::ReferencedHandles::toSet | ( |  | ) | const

inline

std::list<uint> Tp::ReferencedHandles::toStdList | ( |  | ) | const

inline

QVector<uint> Tp::ReferencedHandles::toVector | ( |  | ) | const

inline