kpilot
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>
Public Member Functions | |
const appinfo * | info () const |
appinfo * | info () |
PilotAppInfo () | |
PilotAppInfo (PilotDatabase *d) | |
int | writeTo (PilotDatabase *d) |
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
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.
PilotAppInfo< appinfo, unpack, pack >::PilotAppInfo | ( | ) | [inline] |
Definition at line 176 of file pilotAppInfo.h.
Member Function Documentation
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.
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.
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.
Member Data Documentation
appinfo PilotAppInfo< appinfo, unpack, pack >::fInfo [protected] |
Definition at line 209 of file pilotAppInfo.h.
The documentation for this class was generated from the following file: