kpilot/lib
PilotAppInfoBase Class Reference
#include <pilotAppInfo.h>
Inheritance diagram for PilotAppInfoBase:

Detailed Description
A database on the handheld has an "AppInfo" block at the beginning with some database-specific information and a common part.This base class deals with the common part, the categories.
Most data in the handheld is stored in categories ; every record in every database, for instance, has a category assigned to it (perhaps "Unfiled", but that's just another category).
Every database has a category table assigning labels to the categories that exist. There are CATEGORY_COUNT (16) categories available for each database; labels may vary per database.
This class encapsulates the basic category table manipulations.
Definition at line 50 of file pilotAppInfo.h.
Public Member Functions | |
PilotAppInfoBase (PilotDatabase *d) | |
virtual | ~PilotAppInfoBase () |
CategoryAppInfo * | categoryInfo () |
const struct CategoryAppInfo * | categoryInfo () const |
PI_SIZE_T | length () const |
int | findCategory (const QString &name, bool unknownIsUnfiled=false) |
QString | categoryName (unsigned int i) const |
bool | setCategoryName (unsigned int i, const QString &s) |
void | dump () const |
Protected Member Functions | |
PilotAppInfoBase () | |
void | init (struct CategoryAppInfo *c, int len) |
Protected Attributes | |
CategoryAppInfo * | fC |
PI_SIZE_T | fLen |
bool | fOwn |
Constructor & Destructor Documentation
|
Constructor. This is for use by derived classes (using the template below only, and says that the category info in the base class aliases data in the derived class. Remember to call init()! Definition at line 57 of file pilotAppInfo.h. |
|
Constructor, intended for untyped access to the AppInfo only. This throws away everything but the category information. In this variety, the CategoryAppInfo structure is owned by the PilotAppInfoBase object. Definition at line 35 of file pilotAppInfo.cc. |
|
Destructor.
Definition at line 52 of file pilotAppInfo.cc. |
Member Function Documentation
|
Const version of the above function.
Definition at line 88 of file pilotAppInfo.h. |
|
Retrieve the most basic part of the AppInfo block -- the category information which is guaranteed to be the first 240-odd bytes of a database.
Definition at line 82 of file pilotAppInfo.h. |
|
Gets a single category name.
Returns QString::null if there is no such category number Definition at line 107 of file pilotAppInfo.h. |
|
For debugging, display all the category names.
Definition at line 119 of file pilotAppInfo.h. |
|
Definition at line 100 of file pilotAppInfo.h. |
|
Initialize class members after reading header, to alias data elsewhere. Only for use by the (derived) template classes below. Definition at line 62 of file pilotAppInfo.h. |
|
Returns the length of the (whole) AppInfo block.
Definition at line 94 of file pilotAppInfo.h. |
|
Sets a category name.
Definition at line 57 of file pilotAppInfo.cc. |
The documentation for this class was generated from the following files: