kpilot

CUDCounter Class Reference

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

#include <plugin.h>

List of all members.


Public Member Functions

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

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.


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

unsigned int CUDCounter::countCreated (  )  [inline]

Definition at line 212 of file plugin.h.

unsigned int CUDCounter::countDeleted (  )  [inline]

Definition at line 214 of file plugin.h.

unsigned int CUDCounter::countEnd (  )  [inline]

Definition at line 216 of file plugin.h.

unsigned int CUDCounter::countStart (  )  [inline]

Definition at line 215 of file plugin.h.

unsigned int CUDCounter::countUpdated (  )  [inline]

Definition at line 213 of file plugin.h.

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.

unsigned int CUDCounter::percentDeleted (  )  [inline]

Definition at line 224 of file plugin.h.

unsigned int CUDCounter::percentUpdated (  )  [inline]

Definition at line 223 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: