kpilot/lib

CUDCounter Class Reference

#include <plugin.h>

List of all members.


Detailed Description

Create-Update-Delete tracking of the plugin, used for reporting purposes (in a consistent manner).

The intent is that this class is used by the conduit as it is syncing data. For this to be useful (and be used properly), the conduit needs to tell us how many creates, updates, and deletes it has made to a data store (PC or HH). It also needs to tell us how many records it started with and how many records it has at the conclusion of its processing. Using this information, we can report on it consistently as well as analyze the activity taken by the conduit and offer rollback functionality if we think the conduit has behaved improperly.

Definition at line 194 of file plugin.h.


Public Member Functions

 CUDCounter (QString s)
void created (unsigned int c=1)
void updated (unsigned int u=1)
void deleted (unsigned int d=1)
void setStartCount (unsigned int t)
void setEndCount (unsigned int t)
unsigned int countCreated ()
unsigned int countUpdated ()
unsigned int countDeleted ()
unsigned int countStart ()
unsigned int countEnd ()
unsigned int percentCreated ()
unsigned int percentUpdated ()
unsigned int percentDeleted ()
QString moo () const
QString type () const

Constructor & Destructor Documentation

CUDCounter::CUDCounter QString  s  ) 
 

Create new counter initialized to 0, and be told what kind of CUD we're counting (PC or Handheld, etc.

)

Definition at line 716 of file plugin.cc.


Member Function Documentation

void CUDCounter::created unsigned int  c = 1  ) 
 

Track the creation of c items.

Definition at line 721 of file plugin.cc.

void CUDCounter::deleted unsigned int  d = 1  ) 
 

Track the destruction of d items.

Definition at line 731 of file plugin.cc.

QString CUDCounter::moo  )  const
 

Measurement Of Objects -- report numbers of objects created, updated, deleted.

This string is already i18n()ed.

Definition at line 746 of file plugin.cc.

unsigned int CUDCounter::percentCreated  )  [inline]
 

percentage of changes.

unfortunately, we have to rely on our developers (hi, self!) to correctly set total number of records conduits start with, so add a little protection...

Definition at line 222 of file plugin.h.

void CUDCounter::setEndCount unsigned int  t  ) 
 

How many t items did we end with?

Definition at line 741 of file plugin.cc.

void CUDCounter::setStartCount unsigned int  t  ) 
 

How many t items did we start with?

Definition at line 736 of file plugin.cc.

QString CUDCounter::type  )  const [inline]
 

Type of counter(Handheld or PC).

This string is already i18n()ed.

Definition at line 235 of file plugin.h.

void CUDCounter::updated unsigned int  u = 1  ) 
 

Track updates to u items.

Definition at line 726 of file plugin.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys