• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

akregator

c4_Cursor Class Reference

#include <mk4.h>

List of all members.


Detailed Description

An iterator for collections of rows (views).

Cursor objects can be used to point to specific entries in a view. A cursor acts very much like a pointer to a row in a view, and is returned when taking the address of a c4_RowRef. Dereferencing a cursor leads to the original row reference again. You can construct a cursor for a c4_Row, but since such rows are not part of a collection, incrementing or decrementing these cursors is meaningless (and wrong).

The usual range of pointer operations can be applied to these objects: pre/post-increment and decrement, adding or subtracting integer offsets, as well as the full range of comparison operators. If two cursors point to entries in the same view, their difference can be calculated.

As with regular pointers, care must be taken to avoid running off of either end of a view (the debug build includes assertions to check this).

Definition at line 364 of file mk4.h.


Public Member Functions

 c4_Cursor (c4_Sequence &, int)
c4_RowRef operator * () const
c4_Cursor operator++ (int)
c4_Cursor & operator++ ()
c4_Cursor & operator+= (int)
int operator- (c4_Cursor) const
c4_Cursor operator- (int) const
c4_Cursor operator-- (int)
c4_Cursor & operator-- ()
c4_Cursor & operator-= (int)
c4_RowRef operator[] (int) const

Public Attributes

int _index
c4_Sequence * _seq

Friends

bool operator!= (const c4_RowRef &, const c4_RowRef &)
bool operator!= (c4_Cursor, c4_Cursor)
c4_Cursor operator+ (int, c4_Cursor)
c4_Cursor operator+ (c4_Cursor, int)
bool operator< (const c4_RowRef &, const c4_RowRef &)
bool operator< (c4_Cursor, c4_Cursor)
bool operator<= (const c4_RowRef &, const c4_RowRef &)
bool operator<= (c4_Cursor, c4_Cursor)
bool operator== (const c4_RowRef &, const c4_RowRef &)
bool operator== (c4_Cursor, c4_Cursor)
bool operator> (const c4_RowRef &, const c4_RowRef &)
bool operator> (c4_Cursor, c4_Cursor)
bool operator>= (const c4_RowRef &, const c4_RowRef &)
bool operator>= (c4_Cursor, c4_Cursor)

Constructor & Destructor Documentation

c4_Cursor::c4_Cursor ( c4_Sequence &  ,
int   
)

Construct a new cursor.


Member Function Documentation

c4_RowRef c4_Cursor::operator * (  )  const

Dereference this cursor to "almost" a row.

c4_Cursor c4_Cursor::operator++ ( int   ) 

Post-increment the cursor.

c4_Cursor& c4_Cursor::operator++ (  ) 

Pre-increment the cursor.

c4_Cursor& c4_Cursor::operator+= ( int   ) 

Advance by a given offset.

int c4_Cursor::operator- ( c4_Cursor   )  const

Return the distance between two cursors.

c4_Cursor c4_Cursor::operator- ( int   )  const

Subtract a specified offset.

c4_Cursor c4_Cursor::operator-- ( int   ) 

Post-decrement the cursor.

c4_Cursor& c4_Cursor::operator-- (  ) 

Pre-decrement the cursor.

c4_Cursor& c4_Cursor::operator-= ( int   ) 

Back up by a given offset.

c4_RowRef c4_Cursor::operator[] ( int   )  const

This is the same as *(cursor + offset).


Friends And Related Function Documentation

bool operator!= ( const c4_RowRef &  ,
const c4_RowRef &   
) [friend]

Return true if the contents of both rows are not equal.

bool operator!= ( c4_Cursor  ,
c4_Cursor   
) [friend]

Return true if both cursors are not equal.

c4_Cursor operator+ ( int  ,
c4_Cursor   
) [friend]

Add specified offset to cursor.

c4_Cursor operator+ ( c4_Cursor  ,
int   
) [friend]

Add specified offset.

bool operator< ( const c4_RowRef &  ,
const c4_RowRef &   
) [friend]

True if first row is less than second row.

bool operator< ( c4_Cursor  ,
c4_Cursor   
) [friend]

True if first cursor is less than second cursor.

bool operator<= ( const c4_RowRef &  ,
const c4_RowRef &   
) [friend]

True if first row is less or equal to second row.

bool operator<= ( c4_Cursor  ,
c4_Cursor   
) [friend]

True if first cursor is less or equal to second cursor.

bool operator== ( const c4_RowRef &  ,
const c4_RowRef &   
) [friend]

Return true if the contents of both rows are equal.

bool operator== ( c4_Cursor  ,
c4_Cursor   
) [friend]

Return true if both cursors are equal.

bool operator> ( const c4_RowRef &  ,
const c4_RowRef &   
) [friend]

True if first row is greater than second row.

bool operator> ( c4_Cursor  ,
c4_Cursor   
) [friend]

True if first cursor is greater than second cursor.

bool operator>= ( const c4_RowRef &  ,
const c4_RowRef &   
) [friend]

True if first row is greater or equal to second row.

bool operator>= ( c4_Cursor  ,
c4_Cursor   
) [friend]

True if first cursor is greater or equal to second cursor.


Member Data Documentation

int c4_Cursor::_index

Current index into the sequence.

Definition at line 370 of file mk4.h.

c4_Sequence* c4_Cursor::_seq

Pointer to the sequence.

Definition at line 368 of file mk4.h.


The documentation for this class was generated from the following file:
  • mk4.h

akregator

Skip menu "akregator"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal