kpilot/lib
PhoneSlot Class Reference
#include <pilotAddress.h>
Detailed Description
This class exists only to clear up the type mess that is the field-numbers-and-indexes for phone numbers in the handheld records.The standard address record has 19 fields, five of which are phone fields. Those are fields 3..7 and they are referred to as fields Phone1 .. Phone5. Sometimes we need to act as if the phone field numbers are indeed the field numbers (3..7) and sometimes we need to use those same field numbers to index into a C array (0 based!) so then we map field number 3 (Phone1) to a 0 index.
Also handles iteration nicely.
A phone slot value may be invalid. If so, operations on it will fail (yielding invalid again) and isValid() will return false
.
Definition at line 62 of file pilotAddress.h.
Public Member Functions | |
PhoneSlot () | |
bool | operator== (const PhoneSlot &v) const |
const PhoneSlot & | operator++ () |
bool | isValid () const |
operator QString () const | |
Static Public Member Functions | |
static const PhoneSlot | begin () |
static const PhoneSlot | end () |
Static Public Attributes | |
static const int | invalid = -1 |
Protected Member Functions | |
PhoneSlot (const int v) | |
const PhoneSlot & | operator= (const int &v) |
unsigned int | toOffset () const |
unsigned int | toField () const |
Friends | |
class | PilotAddress |
Constructor & Destructor Documentation
|
Constructor.
Use the specified value for the phone slot. Definition at line 106 of file pilotAddress.cc. |
|
Constructor. The slot is invalid. Definition at line 90 of file pilotAddress.h. |
Member Function Documentation
|
Begin value of an iteration through the phone slots.
Definition at line 138 of file pilotAddress.cc. |
|
When the slot range runs out (past entryPhone5) it is invalid, so the end compares with that.
Definition at line 143 of file pilotAddress.cc. |
|
Valid slots are entryPhone1 (3) through entryPhone5 (7).
Definition at line 117 of file pilotAddress.h. |
|
Iterator operation. Go to the next slot (or invalid when the range runs out). Definition at line 125 of file pilotAddress.cc. |
|
Assignment operator.
Set the value of the slot to the specified value Definition at line 112 of file pilotAddress.cc. |
|
Comparison operator.
Definition at line 96 of file pilotAddress.h. |
|
Map the slot to a field number.
Definition at line 160 of file pilotAddress.cc. |
|
Map the slot to an offset (for use in finding the phone type for a given slot).
Definition at line 148 of file pilotAddress.cc. |
Member Data Documentation
|
Value for invalid slots. */.
Definition at line 87 of file pilotAddress.h. |
The documentation for this class was generated from the following files: