- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages
- Examples

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# fastformat_initialiser Class Reference

`#include <fastformat/fastformat.hpp>`

List of all members.

## Detailed Description

Schwarz Counter initialiser for the FastFormat library.

In "normal" use, this file is included by fastformat/fastformat.hpp, so that every C++ compilation unit that may potentially be issuing FastFormat calls contains, at file scope (well, actually in an anonymous namespace that is itself at file scoope) an instance of the initialiser. Since the FastFormat core is a reference-counted API (see Chapter 11 of Imperfect C++), this means that the first C++ compilation linked in initialises the core, and the remainder keep it initialised, until they are all "completed". In other words, just including fastformat/fastformat.hpp causes FastFormat to be initialised.

In non-"normal" cases, the inclusion is not made, and the initialisation is not performed. These cases are either when:

- The link-unit being built is a dynamic library (as discriminated by the presence of the processor symbol `_USRDLL` or `_WINDLL`, and the preprocessor symbol `FASTFORMAT_FORCE_AUTO_INIT` is not defined), or
- The preprocessor symbol `FASTFORMAT_NO_AUTO_INIT` is defined.

In either of these cases, you must explicitly initialise the FastFormat core (which initialises the front-end and back-end(s)) explicitly, using fastformat_init() and fastformat_uninit().

## Public Types
Member Types
typedef fastformat_initialiser | class_type
## Public Member Functions
Construction
| fastformat_initialiser ()
| Initialises the FastFormat library.
| ~fastformat_initialiser ()
| Uninitialises the FastFormat library.

## Constructor & Destructor Documentation

fastformat_initialiser | ( |  | ) | `[inline]`

Initialises the FastFormat library.

Calls fastformat::fastformat_init(), calling exit(1) on failure

~fastformat_initialiser | ( |  | ) | `[inline]`

Uninitialises the FastFormat library.

Calls fastformat::fastformat_uninit()

The documentation for this class was generated from the following file:

- fastformat/fastformat.hpp

FastFormat Library documentation © Matthew Wilson, 2006-2009 |