Telepathy::Client::ReferencedHandles Class Reference
[Connection proxies]

#include <TelepathyQt4/Client/ReferencedHandles>

List of all members.


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.

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 ()
Connectionconnection () const
uint 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
ReferencedHandlesoperator+= (const ReferencedHandles &another)
ReferencedHandlesoperator<< (const ReferencedHandles &another)
ReferencedHandlesoperator= (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

Friends

class PendingContactAttributes
class PendingHandles


Member Typedef Documentation

typedef UIntList::const_iterator Telepathy::Client::ReferencedHandles::const_iterator

typedef UIntList::ConstIterator Telepathy::Client::ReferencedHandles::ConstIterator

typedef UIntList::const_pointer Telepathy::Client::ReferencedHandles::const_pointer

typedef UIntList::const_reference Telepathy::Client::ReferencedHandles::const_reference

typedef UIntList::difference_type Telepathy::Client::ReferencedHandles::difference_type


Constructor & Destructor Documentation

Telepathy::Client::ReferencedHandles::ReferencedHandles (  ) 

Referenced by mid(), and operator+().

Telepathy::Client::ReferencedHandles::ReferencedHandles ( const ReferencedHandles other  ) 

Telepathy::Client::ReferencedHandles::~ReferencedHandles (  ) 


Member Function Documentation

Connection * Telepathy::Client::ReferencedHandles::connection (  )  const

Referenced by mid(), operator+(), and operator==().

uint Telepathy::Client::ReferencedHandles::handleType (  )  const

uint Telepathy::Client::ReferencedHandles::at ( int  i  )  const

Referenced by first(), last(), operator[](), removeAt(), and takeAt().

uint Telepathy::Client::ReferencedHandles::back (  )  const [inline]

References last().

uint Telepathy::Client::ReferencedHandles::first (  )  const [inline]

References at().

Referenced by front(), and startsWith().

uint Telepathy::Client::ReferencedHandles::front (  )  const [inline]

References first().

uint Telepathy::Client::ReferencedHandles::last (  )  const [inline]

References at(), and size().

Referenced by back(), and endsWith().

uint Telepathy::Client::ReferencedHandles::value ( int  i,
uint  defaultValue = 0 
) const

ReferencedHandles::const_iterator Telepathy::Client::ReferencedHandles::begin (  )  const

Referenced by constBegin().

const_iterator Telepathy::Client::ReferencedHandles::constBegin (  )  const [inline]

References begin().

const_iterator Telepathy::Client::ReferencedHandles::constEnd (  )  const [inline]

References end().

ReferencedHandles::const_iterator Telepathy::Client::ReferencedHandles::end (  )  const

Referenced by constEnd().

bool Telepathy::Client::ReferencedHandles::contains ( uint  handle  )  const

int Telepathy::Client::ReferencedHandles::count ( uint  handle  )  const

int Telepathy::Client::ReferencedHandles::count (  )  const [inline]

References size().

Referenced by length(), and removeAll().

bool Telepathy::Client::ReferencedHandles::empty (  )  const [inline]

References isEmpty().

bool Telepathy::Client::ReferencedHandles::endsWith ( uint  handle  )  const [inline]

References isEmpty(), and last().

int Telepathy::Client::ReferencedHandles::indexOf ( uint  handle,
int  from = 0 
) const

bool Telepathy::Client::ReferencedHandles::isEmpty (  )  const

Referenced by empty(), endsWith(), and startsWith().

int Telepathy::Client::ReferencedHandles::lastIndexOf ( uint  handle,
int  from = -1 
) const

int Telepathy::Client::ReferencedHandles::length (  )  const [inline]

References count().

ReferencedHandles Telepathy::Client::ReferencedHandles::mid ( int  pos,
int  length = -1 
) const

int Telepathy::Client::ReferencedHandles::size (  )  const

Referenced by count(), last(), removeLast(), and takeLast().

bool Telepathy::Client::ReferencedHandles::startsWith ( uint  handle  )  const [inline]

References first(), and isEmpty().

void Telepathy::Client::ReferencedHandles::append ( const ReferencedHandles another  )  [inline]

void Telepathy::Client::ReferencedHandles::clear (  ) 

void Telepathy::Client::ReferencedHandles::move ( int  from,
int  to 
)

void Telepathy::Client::ReferencedHandles::pop_back (  )  [inline]

References removeLast().

void Telepathy::Client::ReferencedHandles::pop_front (  )  [inline]

References removeFirst().

int Telepathy::Client::ReferencedHandles::removeAll ( uint  handle  ) 

References count(), and Telepathy::warning().

void Telepathy::Client::ReferencedHandles::removeAt ( int  i  ) 

References at(), handleType(), and Telepathy::warning().

Referenced by removeFirst(), and removeLast().

void Telepathy::Client::ReferencedHandles::removeFirst (  )  [inline]

References removeAt().

Referenced by pop_front().

void Telepathy::Client::ReferencedHandles::removeLast (  )  [inline]

References removeAt(), and size().

Referenced by pop_back().

bool Telepathy::Client::ReferencedHandles::removeOne ( uint  handle  ) 

void Telepathy::Client::ReferencedHandles::swap ( int  i,
int  j 
)

uint Telepathy::Client::ReferencedHandles::takeAt ( int  i  ) 

References at(), handleType(), and Telepathy::warning().

Referenced by takeFirst(), and takeLast().

uint Telepathy::Client::ReferencedHandles::takeFirst (  )  [inline]

References takeAt().

uint Telepathy::Client::ReferencedHandles::takeLast (  )  [inline]

References size(), and takeAt().

bool Telepathy::Client::ReferencedHandles::operator!= ( const ReferencedHandles another  )  const [inline]

bool Telepathy::Client::ReferencedHandles::operator!= ( const UIntList another  )  const [inline]

ReferencedHandles Telepathy::Client::ReferencedHandles::operator+ ( const ReferencedHandles another  )  const

ReferencedHandles& Telepathy::Client::ReferencedHandles::operator+= ( const ReferencedHandles another  )  [inline]

ReferencedHandles& Telepathy::Client::ReferencedHandles::operator<< ( const ReferencedHandles another  )  [inline]

ReferencedHandles & Telepathy::Client::ReferencedHandles::operator= ( const ReferencedHandles another  ) 

References mPriv.

bool Telepathy::Client::ReferencedHandles::operator== ( const ReferencedHandles another  )  const

References connection(), handleType(), and mPriv.

bool Telepathy::Client::ReferencedHandles::operator== ( const UIntList list  )  const

uint Telepathy::Client::ReferencedHandles::operator[] ( int  i  )  const [inline]

References at().

UIntList Telepathy::Client::ReferencedHandles::toList (  )  const

QSet<uint> Telepathy::Client::ReferencedHandles::toSet (  )  const [inline]

References toList().

std::list<uint> Telepathy::Client::ReferencedHandles::toStdList (  )  const [inline]

References toList().

QVector<uint> Telepathy::Client::ReferencedHandles::toVector (  )  const [inline]

References toList().


Friends And Related Function Documentation

friend class PendingContactAttributes [friend]

friend class PendingHandles [friend]


Generated on Fri Feb 27 12:10:35 2009 for TelepathyQt4-0.1.0 by  doxygen 1.5.6