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

# The FastFormat Core Library

## Modules
| Interface Functions
## Classes
class | fastformat_exception
| Root class for all FastFormat exception. More...
## Functions
int | fastformat_init (void)
| Initialises the FastFormat library.
void | fastformat_uninit (void)
| Uninitialises the FastFormat library.
ff_char_t const * | fastformat_getInitCodeString (int code)
| Returns a constant pointer to a non-NULL non-modifiable nul-terminated string representing the initialisation code.
size_t | fastformat_getInitCodeStringLength (int code)
| Returns the length of the string returned by fastformat_getInitCodeString().
int | init ()
| Equivalent to fastformat_init().
void | uninit ()
| Equivalent to fastformat_uninit().
ff_char_t const * | getInitCodeString (int code)
| Equivalent to fastformat_getInitCodeString().
size_t | getInitCodeStringLength (int code)
| Equivalent to fastformat_getInitCodeStringLength().
string_slice_t | getNewlineForPlatform ()
| Equivalent to fastformat_getNewlineForPlatform().

## Function Documentation

ff_char_t const* fastformat::fastformat_getInitCodeString | ( | int | code | ) |

Returns a constant pointer to a non-NULL non-modifiable nul-terminated string representing the initialisation code.

Parameters:

  | code | The initialisation code whose string explanation is to be returned. If the code is not recognised, the empty string (`""`) will be returned.

size_t fastformat::fastformat_getInitCodeStringLength | ( | int | code | ) |

Returns the length of the string returned by fastformat_getInitCodeString().

Parameters:

  | code | The initialisation code whose string equivalent is to be returned. If the code is not recognised, 0 will be returned.

int fastformat::fastformat_init | ( | void |  | ) |

Initialises the FastFormat library.

Returns:
  Indicates

Return values:

  | <0 | initialisation has failed, and the library cannot be used
  | >=0 | initialisation has succeeded, and the library can be used. fastformat_uninit() should be called when the library is no longer needed

Note:
  C++ compilation units that include fastformat/fastformat.hpp do not need to explicitly call FastFormat_init() / FastFormat_uninit(), since they will be automatically called by the FastFormat_initialiser Schwarz counter class defined by the C++ inclusion. Further note that this is disabled by the definition of the `FASTFORMAT_NO_AUTO_INIT`, which is automatically defined by a Windows DLL build (as detected by the presence of any of the `__DLL__`, `_WINDLL` or `_USRDLL` symbols). Auto-initialisation can be forced regardless of the definition of `FASTFORMAT_NO_AUTO_INIT` by the definition of the symbol `FASTFORMAT_FORCE_AUTO_INIT`.

void fastformat::fastformat_uninit | ( | void |  | ) |

Uninitialises the FastFormat library.

Should be called for every call to fastformat_init() that returns a non-negative code

Note:
  C++ compilation units that include fastformat/fastformat.hpp do not need to explicitly call fastformat_init() / fastformat_uninit(), since they will be automatically called by the fastformat_initialiser Schwarz counter class defined by the C++ inclusion. Further note that this is disabled by the definition of the `FASTFORMAT_NO_AUTO_INIT`, which is automatically defined by a Windows DLL build (as detected by the presence of any of the `__DLL__`, `_WINDLL`, `_USRDLL` or `_AFXDLL` symbols). Auto-initialisation can be forced regardless of the definition of `FASTFORMAT_NO_AUTO_INIT` by the definition of the symbol `FASTFORMAT_FORCE_AUTO_INIT`.

ff_char_t const* fastformat::getInitCodeString | ( | int | code | ) | `[inline]`

Equivalent to fastformat_getInitCodeString().

size_t fastformat::getInitCodeStringLength | ( | int | code | ) | `[inline]`

Equivalent to fastformat_getInitCodeStringLength().

string_slice_t fastformat::getNewlineForPlatform | ( |  | ) | `[inline]`

Equivalent to fastformat_getNewlineForPlatform().

int fastformat::init | ( |  | ) | `[inline]`

Equivalent to fastformat_init().

void fastformat::uninit | ( |  | ) | `[inline]`

Equivalent to fastformat_uninit().

FastFormat Library documentation © Matthew Wilson, 2006-2009 |