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

Pantheios N Stock Back-end
[Pantheios Stock Back-ends]


Detailed Description

Back-end library that splits output to N back-ends.


Modules

 Pantheios be.N Stock Back-end Flags
 Flags for the Pantheios N Stock Back-end.

Classes

struct  pan_be_N_t
 Structure that describes a back-end to be used by the Pantheios N Stock Back-end. More...

Defines

#define PANTHEIOS_BE_N_STDFORM_ENTRY(backEndId, be_prefix, flags)
 Defines an entry in an array of pan_be_N_t.
#define PANTHEIOS_BE_N_FILTERED_ENTRY(backEndId, be_prefix, severityCeiling, flags)
 Defines an entry in an array of pan_be_N_t.
#define PANTHEIOS_BE_N_TERMINATOR_ENTRY   { 0, 0, NULL, NULL, NULL, -1, NULL }
 Defines a terminating entry in an array of pan_be_N_t.

Variables

PANTHEIOS_EXTERN_C pan_be_N_t PAN_BE_N_BACKEND_LIST []
 The application-defined array of back-end descriptors that specify what concrete back-ends are to be attached to the program.


Define Documentation

#define PANTHEIOS_BE_N_FILTERED_ENTRY ( backEndId,
be_prefix,
severityCeiling,
flags   ) 

Value:

{                                                                                                       \
            flags                                                                                           \
        ,   backEndId                                                                                       \
        ,   (int(PANTHEIOS_CALLCONV*)(PAN_CHAR_T const*,int,void const*,void*,void**))be_prefix ## _init    \
        ,   be_prefix ## _uninit                                                                            \
        ,   be_prefix ## _logEntry                                                                          \
        ,   severityCeiling                                                                                 \
        ,   NULL                                                                                            \
    }
Defines an entry in an array of pan_be_N_t.

Parameters:
backEndId The back-end identifier. Must be >0.
be_prefix The prefix of all the back-end functions, e.g. pantheios_be_speech.
severityCeiling A static severity level, used to filter out messages of a given severity level prior to passing to the given specific back-end.
flags A combination of the be.N flags that control the behaviour of the given back-end.
This is used in combination with PANTHEIOS_BE_N_TERMINATOR_ENTRY to define the set of concrete back-ends are to be attached to the program:
pan_be_N_t  PAN_BE_N_BACKEND_LIST[] =
{
    PANTHEIOS_BE_N_STDFORM_ENTRY(1, pantheios_be_file, 0)
  , PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_fprintf, 0)
  , PANTHEIOS_BE_N_STDFORM_ENTRY(3, pantheios_be_null, 0)
#if defined(PLATFORMSTL_OS_IS_UNIX)
  , PANTHEIOS_BE_N_FILTERED_ENTRY(4, pantheios_be_syslog, PANTHEIOS_SEV_WARNING, 0)
#elif defined(PLATFORMSTL_OS_IS_WIN32) || \
      defined(PLATFORMSTL_OS_IS_WIN64)
  , PANTHEIOS_BE_N_FILTERED_ENTRY(4, pantheios_be_WindowsSyslog, PANTHEIOS_SEV_WARNING, 0)
#endif
  , PANTHEIOS_BE_N_STDFORM_ENTRY(5, pantheios_be_file, 0)
  , PANTHEIOS_BE_N_TERMINATOR_ENTRY
};

The output to back-end 4 is statically filtered, so that any statement with severity less than or equal to the specified level will be output, subject to dynamic filtering via pantheios_fe_isSeverityLogged().

#define PANTHEIOS_BE_N_STDFORM_ENTRY ( backEndId,
be_prefix,
flags   ) 

Value:

{                                                               \
            flags                                                   \
        ,   backEndId                                               \
        ,   (int(PANTHEIOS_CALLCONV *)(PAN_CHAR_T const*,int,void const*,void*,void**))be_prefix ## _init \
        ,   be_prefix ## _uninit                                    \
        ,   be_prefix ## _logEntry                                  \
        ,   INT_MAX                                                 \
        ,   NULL                                                    \
    }
Defines an entry in an array of pan_be_N_t.

Parameters:
backEndId The back-end identifier. Must be >0
be_prefix The prefix of all the back-end functions, e.g. pantheios_be_speech
flags A combination of the be.N flags that control the behaviour of the given back-end
This is used in combination with PANTHEIOS_BE_N_TERMINATOR_ENTRY to define the set of concrete back-ends are to be attached to the program:
pan_be_N_t  PAN_BE_N_BACKEND_LIST[] =
{
    PANTHEIOS_BE_N_STDFORM_ENTRY(1, pantheios_be_file, 0)
  , PANTHEIOS_BE_N_STDFORM_ENTRY(2, pantheios_be_fprintf, 0)
  , PANTHEIOS_BE_N_STDFORM_ENTRY(3, pantheios_be_null, 0)
#if defined(PLATFORMSTL_OS_IS_UNIX)
  , PANTHEIOS_BE_N_STDFORM_ENTRY(4, pantheios_be_syslog, 0)
#elif defined(PLATFORMSTL_OS_IS_WIN32) || \
      defined(PLATFORMSTL_OS_IS_WIN64)
  , PANTHEIOS_BE_N_STDFORM_ENTRY(4, pantheios_be_WindowsSyslog, 0)
#endif
  , PANTHEIOS_BE_N_STDFORM_ENTRY(5, pantheios_be_file, 0)
  , PANTHEIOS_BE_N_TERMINATOR_ENTRY
};

Note:
This is to be used insead of PANTHEIOS_BE_N_ENTRY
Examples:
c/example.c.N/example.c.N.c, cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp, and cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp.

#define PANTHEIOS_BE_N_TERMINATOR_ENTRY   { 0, 0, NULL, NULL, NULL, -1, NULL }

Defines a terminating entry in an array of pan_be_N_t.

See also:
PANTHEIOS_BE_N_STDFORM_ENTRY
Examples:
c/example.c.N/example.c.N.c, cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp, and cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp.


Variable Documentation

PANTHEIOS_EXTERN_C pan_be_N_t PAN_BE_N_BACKEND_LIST[]

The application-defined array of back-end descriptors that specify what concrete back-ends are to be attached to the program.

Note:
The array must be defined with a last terminator element whose pfnInit member is NULL.
Examples:
c/example.c.N/example.c.N.c, cpp/backends/example.cpp.backends.mx.1/example.cpp.backends.mx.1.cpp, and cpp/backends/example.cpp.backends.mx.2/example.cpp.backends.mx.2.cpp.


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