ALPSCore reference
Static Public Member Functions | Static Protected Member Functions | List of all members
alps::alea::internal::format_registry< T > Class Template Reference

#include <format.hpp>

Collaboration diagram for alps::alea::internal::format_registry< T >:
Collaboration graph

Static Public Member Functions

static T & get (std::ios_base &stream, T init=T())
 
static void remove (std::ios_base &stream)
 

Static Protected Member Functions

static void callback (std::ios::event event, std::ios_base &stream, int xindex)
 
static T *& get_format (std::ios_base &stream)
 
static int get_xindex ()
 

Detailed Description

template<typename T>
class alps::alea::internal::format_registry< T >

Allows the addition of custom formatting state to I/O stream objects.

This class allows to store one instance of type T with each std::ios_base instance via the get() method. This in turn can be used to implement user-defined I/O manipulators that modify these format flags and are then used by stream operations with user-defined objects.

See also
get_format()

Definition at line 14 of file format.hpp.

Member Function Documentation

template<typename T >
static void alps::alea::internal::format_registry< T >::callback ( std::ios::event  event,
std::ios_base &  stream,
int  xindex 
)
inlinestaticprotected

Manages lifecycle using the std::ios_base call-back mechanism

Definition at line 130 of file format.hpp.

template<typename T >
static T& alps::alea::internal::format_registry< T >::get ( std::ios_base &  stream,
init = T() 
)
inlinestatic

Returns reference to format object for stream, creating it if needed.

Definition at line 110 of file format.hpp.

template<typename T >
static T*& alps::alea::internal::format_registry< T >::get_format ( std::ios_base &  stream)
inlinestaticprotected

Definition at line 158 of file format.hpp.

template<typename T >
static int alps::alea::internal::format_registry< T >::get_xindex ( )
inlinestaticprotected

Definition at line 163 of file format.hpp.

template<typename T >
static void alps::alea::internal::format_registry< T >::remove ( std::ios_base &  stream)
inlinestatic

Removes format object from stream

Definition at line 123 of file format.hpp.


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