kpilot/lib

PilotAppInfo< appinfo, unpack, pack > Class Template Reference

#include <pilotDatabase.h>

Inheritance diagram for PilotAppInfo< appinfo, unpack, pack >:

PilotAppInfoBase List of all members.

Detailed Description

template<typename appinfo, int(*)(appinfo *, unsigned char *, PI_SIZE_T) unpack, int(*)(appinfo *, unsigned char *, PI_SIZE_T) pack>
class PilotAppInfo< appinfo, unpack, pack >

A template class for reading and interpreting AppInfo blocks; the idea is that it handles all the boilerplate code for reading the app block, converting it to the right kind, and then unpacking it.

Template parameters are the type (struct, from pilot-link probably) of the interpreted appinfo, and the pack and unpack functions for it (again, from pilot-link).

Definition at line 288 of file pilotDatabase.h.


Public Member Functions

 PilotAppInfo (PilotDatabase *d)
int write (PilotDatabase *d)
appinfo * info ()

Protected Attributes

appinfo fInfo

Constructor & Destructor Documentation

template<typename appinfo, int(*)(appinfo *, unsigned char *, PI_SIZE_T) unpack, int(*)(appinfo *, unsigned char *, PI_SIZE_T) pack>
PilotAppInfo< appinfo, unpack, pack >::PilotAppInfo ( PilotDatabase d  )  [inline]

Constructor.

Read the appinfo from database d and interpret it.

Definition at line 294 of file pilotDatabase.h.


Member Function Documentation

template<typename appinfo, int(*)(appinfo *, unsigned char *, PI_SIZE_T) unpack, int(*)(appinfo *, unsigned char *, PI_SIZE_T) pack>
appinfo* PilotAppInfo< appinfo, unpack, pack >::info (  )  [inline]

Returns a (correctly typed) pointer to the interpreted appinfo block.

Definition at line 331 of file pilotDatabase.h.

template<typename appinfo, int(*)(appinfo *, unsigned char *, PI_SIZE_T) unpack, int(*)(appinfo *, unsigned char *, PI_SIZE_T) pack>
int PilotAppInfo< appinfo, unpack, pack >::write ( PilotDatabase d  )  [inline]

Write this appinfo block to the database d; returns the number of bytes written or -1 on failure.

This function is robust when called with a NULL database d.

Definition at line 313 of file pilotDatabase.h.


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