kpilot/lib
PilotAppInfo< appinfo, unpack, pack > Class Template Reference
#include <pilotAppInfo.h>
Inheritance diagram for PilotAppInfo< appinfo, unpack, pack >:

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 141 of file pilotAppInfo.h.
Public Member Functions | |
PilotAppInfo (PilotDatabase *d) | |
PilotAppInfo () | |
int | writeTo (PilotDatabase *d) |
appinfo * | info () |
const appinfo * | info () const |
Protected Attributes | |
appinfo | fInfo |
Constructor & Destructor Documentation
PilotAppInfo< appinfo, unpack, pack >::PilotAppInfo | ( | PilotDatabase * | d | ) | [inline] |
Constructor.
Read the appinfo from database d
and interpret it.
Definition at line 147 of file pilotAppInfo.h.
Member Function Documentation
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 178 of file pilotAppInfo.h.
appinfo* PilotAppInfo< appinfo, unpack, pack >::info | ( | ) | [inline] |
Returns a (correctly typed) pointer to the interpreted appinfo block.
Definition at line 196 of file pilotAppInfo.h.
const appinfo* PilotAppInfo< appinfo, unpack, pack >::info | ( | ) | const [inline] |
Returns a const (correctly typed) pointer to the interpreted appinfo block.
Definition at line 200 of file pilotAppInfo.h.
The documentation for this class was generated from the following file: