Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

pantheios/util/core/apidefs.hpp File Reference


Detailed Description

[C++ only] API definition helpers for use in Pantheios back- and front- ends.

#include <pantheios/pantheios.h>
#include <pantheios/backend.h>
#include <pantheios/frontend.h>
#include <pantheios/init_codes.h>
#include <stlsoft/stlsoft.h>

Go to the source code of this file.

Typedefs

typedef int(PANTHEIOS_CALLCONV * pantheios_fe_X_init_pfn_t )(void *reserved, void **ptoken)
 Generic function pointer typedef for front-end initialisation.
typedef int(PANTHEIOS_CALLCONV * pantheios_fe_X_uninit_pfn_t )(void *token)
 Function pointer typedef for front-end uninitialisation.
typedef PAN_CHAR_T const
*(PANTHEIOS_CALLCONV * 
pantheios_fe_X_getProcessIdentity_pfn_t )(void *token)
 Function pointer typedef for front-end process-identity.
typedef int(PANTHEIOS_CALLCONV * pantheios_fe_X_isSeverityLogged_pfn_t )(void *token, int severity, int backEndId)
 Function pointer typedef for front-end severity arbitration.
typedef int(PANTHEIOS_CALLCONV * pantheios_be_X_init_pfn_t )(PAN_CHAR_T const *processIdentity, int backEndId, void const *init, void *reserved, void **ptoken)
 Generic function pointer typedef for back-end initialisation.
typedef int(PANTHEIOS_CALLCONV * pantheios_be_X_uninit_pfn_t )(void *token)
 Function pointer typedef for back-end uninitialisation.
typedef int(PANTHEIOS_CALLCONV * pantheios_be_X_logEntry_pfn_t )(void *feToken, void *beToken, int severity, PAN_CHAR_T const *entry, size_t cchEntry)
 Function pointer typedef for back-end entry logging.

Functions

int pantheios_call_fe_init (pantheios_fe_X_init_pfn_t pfn, void *reserved, void **ptoken)
 Invokes a front-end initialisation function, implementating all the exception-handling boilerplate for the function.
int pantheios_call_fe_uninit (pantheios_fe_X_uninit_pfn_t pfn, void *token)
 Invokes a front-end uninitialisation function, implementating all the exception-handling boilerplate for the function.
PAN_CHAR_T const * pantheios_call_fe_getProcessIdentity (pantheios_fe_X_getProcessIdentity_pfn_t pfn, void *token)
 Invokes a front-end process-identity function, implementating all the exception-handling boilerplate for the function.
int pantheios_call_fe_isSeverityLogged (pantheios_fe_X_isSeverityLogged_pfn_t pfn, void *token, int severity, int backEndId)
 Invokes a front-end severity arbitration function, implementating all the exception-handling boilerplate for the function.
int pantheios_call_be_void_init (pantheios_be_X_init_pfn_t pfn, PAN_CHAR_T const *processIdentity, int backEndId, void const *init, void *reserved, void **ptoken)
 Invokes a back-end initialisation function, implementating all the exception-handling boilerplate for the function.
template<typename T>
int pantheios_call_be_X_init (int(*pfn)(PAN_CHAR_T const *, int, T const *, void *, void **), PAN_CHAR_T const *processIdentity, int backEndId, T const *init, void *reserved, void **ptoken)
 Invokes a back-end initialisation function, implementating all the exception-handling boilerplate for the function.
int pantheios_call_be_uninit (pantheios_be_X_uninit_pfn_t pfn, void *token)
 Invokes a back-end uninitialisation function, implementating all the exception-handling boilerplate for the function.
int pantheios_call_be_logEntry (pantheios_be_X_logEntry_pfn_t pfn, void *feToken, void *beToken, int severity, PAN_CHAR_T const *entry, size_t cchEntry)
 Invokes a back-end log function, implementating all the exception-handling boilerplate for the function.


Typedef Documentation

typedef int(PANTHEIOS_CALLCONV* pantheios_be_X_init_pfn_t)(PAN_CHAR_T const *processIdentity, int backEndId, void const *init, void *reserved, void **ptoken)

Generic function pointer typedef for back-end initialisation.

typedef int(PANTHEIOS_CALLCONV* pantheios_be_X_logEntry_pfn_t)(void *feToken, void *beToken, int severity, PAN_CHAR_T const *entry, size_t cchEntry)

Function pointer typedef for back-end entry logging.

typedef int(PANTHEIOS_CALLCONV* pantheios_be_X_uninit_pfn_t)(void *token)

Function pointer typedef for back-end uninitialisation.

typedef PAN_CHAR_T const*(PANTHEIOS_CALLCONV* pantheios_fe_X_getProcessIdentity_pfn_t)(void *token)

Function pointer typedef for front-end process-identity.

typedef int(PANTHEIOS_CALLCONV* pantheios_fe_X_init_pfn_t)(void *reserved, void **ptoken)

Generic function pointer typedef for front-end initialisation.

typedef int(PANTHEIOS_CALLCONV* pantheios_fe_X_isSeverityLogged_pfn_t)(void *token, int severity, int backEndId)

Function pointer typedef for front-end severity arbitration.

typedef int(PANTHEIOS_CALLCONV* pantheios_fe_X_uninit_pfn_t)(void *token)

Function pointer typedef for front-end uninitialisation.


Function Documentation

int pantheios_call_be_logEntry ( pantheios_be_X_logEntry_pfn_t  pfn,
void *  feToken,
void *  beToken,
int  severity,
PAN_CHAR_T const *  entry,
size_t  cchEntry 
)

Invokes a back-end log function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The back-end log function
feToken The feToken parameter to be passed to pfn
beToken The beToken parameter to be passed to pfn
severity The severity parameter to be passed to pfn
entry The entry parameter to be passed to pfn
cchEntry The cchEntry parameter to be passed to pfn

int pantheios_call_be_uninit ( pantheios_be_X_uninit_pfn_t  pfn,
void *  token 
)

Invokes a back-end uninitialisation function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The back-end uninitialisation function
token The token parameter to be passed to pfn

int pantheios_call_be_void_init ( pantheios_be_X_init_pfn_t  pfn,
PAN_CHAR_T const *  processIdentity,
int  backEndId,
void const *  init,
void *  reserved,
void **  ptoken 
)

Invokes a back-end initialisation function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The back-end initialisation function
processIdentity The processIdentity parameter to be passed to pfn
backEndId The backEndId parameter to be passed to pfn
init The init parameter to be passed to pfn
reserved The reserved parameter to be passed to pfn
ptoken The ptoken parameter to be passed to pfn

int pantheios_call_be_X_init ( int(*)(PAN_CHAR_T const *, int, T const *, void *, void **)  pfn,
PAN_CHAR_T const *  processIdentity,
int  backEndId,
T const *  init,
void *  reserved,
void **  ptoken 
) [inline]

Invokes a back-end initialisation function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The back-end initialisation function
processIdentity The processIdentity parameter to be passed to pfn
backEndId The backEndId parameter to be passed to pfn
init The init parameter to be passed to pfn
reserved The reserved parameter to be passed to pfn
ptoken The ptoken parameter to be passed to pfn

PAN_CHAR_T const* pantheios_call_fe_getProcessIdentity ( pantheios_fe_X_getProcessIdentity_pfn_t  pfn,
void *  token 
)

Invokes a front-end process-identity function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The front-end process-identity function
token The token parameter to be passed to pfn

int pantheios_call_fe_init ( pantheios_fe_X_init_pfn_t  pfn,
void *  reserved,
void **  ptoken 
)

Invokes a front-end initialisation function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The front-end initialisation function
reserved The reserved parameter to be passed to pfn
ptoken The ptoken parameter to be passed to pfn

int pantheios_call_fe_isSeverityLogged ( pantheios_fe_X_isSeverityLogged_pfn_t  pfn,
void *  token,
int  severity,
int  backEndId 
)

Invokes a front-end severity arbitration function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The front-end severity arbitration function
token The token parameter to be passed to pfn
severity The severity level to test. Usually one of the PANTHEIOS_SEV_* enumerators.
backEndId A front-end+back-end specific parameter. This is used to enable a back-end, such as the be.lrsplit library, to simultaneously provide multiple actual back-ends and query the front-end for their respective. The value 0 is used within the Pantheios library and stands for every back-end. All other values indicate specific back-end splits, although by convention 1 indicates local logging and 2 indicates remote logging.

int pantheios_call_fe_uninit ( pantheios_fe_X_uninit_pfn_t  pfn,
void *  token 
)

Invokes a front-end uninitialisation function, implementating all the exception-handling boilerplate for the function.

Parameters:
pfn The front-end uninitialisation function
token The token parameter to be passed to pfn


pantheios Library documentation Matthew Wilson & Synesis Software, 2006-2011 SourceForge.net Logo