[Dec '10] Coming soon: Pantheios.Net. The same technology that allows Pantheios (C++) to be robust, succinct, extensible and highly efficient, applied to the .NET platform. Watch this space ... (or get in contact)




Tutorials: Back-ends

Using a Stock Back-end

Using a stock back-end generally involves nothing more than linking to it, either explicitly or implicitly. For example, if you're using the Visual C++ 7.1 compiler, and are building for the static multithreaded runtime library, you would link to both
libraries for debug builds, or to both
libraries for release builds. The reason for two libraries for each back-end in this scenario is that the stock back-end implementations come in four peices, as follows:

Name Sole Interface Library Local Interface Library Remote Interface Library Implementation (Common) Library
ACE be.ACE bel.ACE ber.ACE bec.ACE
COM Error Object be.COMErrorObject bel.COMErrorObject ber.COMErrorObject bec.COMErrorObject
file be.file bel.file ber.file bec.file
fprintf be.fprintf bel.fprintf ber.fprintf bec.fprintf
null be.null bel.null ber.null bec.null
SysLog be.syslog bel.syslog ber.syslog bec.syslog
Win32 Console be.Win32Console bel.Win32Console ber.Win32Console bec.Win32Console
Win32 Debugger be.Win32Debugger bel.Win32Debugger ber.Win32Debugger bec.Win32Debugger
Win32 SysLog be.Win32syslog bel.Win32syslog ber.Win32syslog bec.Win32syslog
Windows Event Log be.WindowsEventLog bel.WindowsEventLog ber.WindowsEventLog bec.WindowsEventLog

The Implementation (Common) Library defines the actual implementation of the library. For example, bec.null defines the following functions:
PANTHEIOS_CALL(int)  pantheios_be_null_init(    char const* processIdentity
                                          ,     int         id
                                          ,     void*       unused
                                          ,     void*       reserved
                                          ,     void**      ptoken);
PANTHEIOS_CALL(void) pantheios_be_null_uninit(  void*       token);
PANTHEIOS_CALL(int)  pantheios_be_null_logEntry(void*       feToken
                                              , void*       beToken
                                              , int         severity
                                              , char const* entry
                                              , size_t      cchEntry);
The Sole Interface Library uses the Implementation (Common) Library to define the required standard back-end interface API, as shown below:
PANTHEIOS_CALL(int) pantheios_be_init(char const* processIdentity
                                    , void*       reserved
                                    , void**      ptoken)
  return pantheios_be_null_init(processIdentity, PANTHEIOS_BEID_LOCAL, NULL, reserved, ptoken);

PANTHEIOS_CALL(void) pantheios_be_uninit(void* token)

PANTHEIOS_CALL(int) pantheios_be_logEntry(void*       feToken
                                        , void*       beToken
                                        , int         severity
                                        , char const*  entry
                                        , size_t      cchEntry)

  return pantheios_be_null_logEntry(feToken, beToken, severity, entry, cchEntry);

This is why we need to specify both libraries when explicitly linking.

When using implicit linking, one need only included the file for the Sole Interface Library, because these files include the implicit link header file for the Implementation (Common) Library. Hence:
  #include <pantheios/implicit_link/be.null.h>
is all that's required.

(Note: we'll discuss the Local Interface Library and Remote Interface Library in the next tutorial on back-end splitting.)

See also

  • Essentials - essential facts you need to know about Pantheios to get up and running.
  • Pantheios Architecture - introduction to the four parts of the Pantheios architecture: Application Layer, Core, Front-end, Back-ends.
  • Downloads - download the Pantheios library (source and binaries), samples, tools and dependent projects.
  • Tutorials - tutorials on using the Pantheios library.
  • Related Material - read up on the concepts of Shims & Type Tunneling, on the STLSoft auto_buffer class, on namespace aliasing, and more ...
  • API Documentation - once you've familiarised yourself with Pantheios via the tutorials, use the online documentation for fine details on the API functions and types.
  • Project Members - see who is implementing Pantheios, and how you can help out.
  • Performance - performance tests, which demonstrate the claimed peerless performance of Pantheios.
  • Future Directions - features that are anticipated/planned, but not yet implemented.


Support This Project

Copyright (c) 1999-2010 Synesis Software Pty Ltd

Valid XHTML 1.0 Transitional