kpilot/lib

PilotAppInfo< appinfo, unpack, pack > Class Template Reference

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. More...

#include <pilotAppInfo.h>

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

PilotAppInfoBase

List of all members.


Public Member Functions

 PilotAppInfo (PilotDatabase *d)
int writeTo (PilotDatabase *d)
appinfo * info ()
const appinfo * info () const

Protected Attributes

appinfo fInfo

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 148 of file pilotAppInfo.h.


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 154 of file pilotAppInfo.h.


Member Function Documentation

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

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

Definition at line 209 of file pilotAppInfo.h.

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 205 of file pilotAppInfo.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 >::writeTo ( 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 187 of file pilotAppInfo.h.


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