Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::chrono::ios_state_ptr< Final, T > Class Template Reference

ios_state_ptr is a smart pointer to a ios_base specific state. More...

#include <ios_base_state_ptr.hpp>

Inheritance diagram for boost::chrono::ios_state_ptr< Final, T >:
Collaboration diagram for boost::chrono::ios_state_ptr< Final, T >:

Public Types

typedef T element_type
 The pointee type. More...
 

Public Member Functions

 ios_state_ptr (std::ios_base &ios)
 Explicit constructor. More...
 
 ~ios_state_ptr ()
 Nothing to do as xalloc index can not be removed. More...
 
T const * get () const BOOST_NOEXCEPT
 Allocates the index if not already done. More...
 
Tget () BOOST_NOEXCEPT
 Allocates the index if not already done. More...
 
Toperator-> () BOOST_NOEXCEPT
 as if return get(); More...
 
T const * operator-> () const BOOST_NOEXCEPT
 as if return get(); More...
 
Toperator* () BOOST_NOEXCEPT
 as if return *get(); More...
 
T const & operator* () const BOOST_NOEXCEPT
 as if return *get(); More...
 
Trelease () BOOST_NOEXCEPT
 reset the current pointer after storing in a temporary variable the pointer to the current state. More...
 
void reset (T *new_ptr=0) BOOST_NOEXCEPT
 
 operator bool () const BOOST_NOEXCEPT
 Explicit conversion to bool. More...
 
std::ios_base & getios () BOOST_NOEXCEPT
 
std::ios_base & getios () const BOOST_NOEXCEPT
 
 operator std::ios_base & () BOOST_NOEXCEPT
 Implicit conversion to the ios_base. More...
 
 operator std::ios_base & () const BOOST_NOEXCEPT
 Implicit conversion to the ios_base const. More...
 

Protected Attributes

std::ios_base & ios_
 

Detailed Description

template<typename Final, typename T>
class boost::chrono::ios_state_ptr< Final, T >

ios_state_ptr is a smart pointer to a ios_base specific state.

Member Typedef Documentation

template<typename Final , typename T >
typedef T boost::chrono::ios_state_ptr< Final, T >::element_type

The pointee type.

Constructor & Destructor Documentation

template<typename Final , typename T >
boost::chrono::ios_state_ptr< Final, T >::ios_state_ptr ( std::ios_base &  ios)
inlineexplicit

Explicit constructor.

Parameters
iosthe ios Constructs a ios_state_ptr by storing the associated ios.
template<typename Final , typename T >
boost::chrono::ios_state_ptr< Final, T >::~ios_state_ptr ( )
inline

Nothing to do as xalloc index can not be removed.

Member Function Documentation

template<typename Final , typename T >
T const* boost::chrono::ios_state_ptr< Final, T >::get ( ) const
inline

Allocates the index if not already done.

Registers the callback responsible of maintaining the state pointer coherency, if not already done. Retrieves the associated ios pointer

Returns
the retrieved pointer statically casted to const.

References boost::chrono::ios_state_ptr< Final, T >::ios_, and T.

template<typename Final , typename T >
T* boost::chrono::ios_state_ptr< Final, T >::get ( )
inline

Allocates the index if not already done.

Registers the callback responsible of maintaining the state pointer coherency, if not already done. Retrieves the associated ios pointer

Returns
the retrieved pointer.

References boost::chrono::ios_state_ptr< Final, T >::ios_, and T.

template<typename Final , typename T >
std::ios_base& boost::chrono::ios_state_ptr< Final, T >::getios ( )
inline
template<typename Final , typename T >
std::ios_base& boost::chrono::ios_state_ptr< Final, T >::getios ( ) const
inline
template<typename Final , typename T >
boost::chrono::ios_state_ptr< Final, T >::operator bool ( ) const
inlineexplicit

Explicit conversion to bool.

template<typename Final , typename T >
boost::chrono::ios_state_ptr< Final, T >::operator std::ios_base & ( )
inline

Implicit conversion to the ios_base.

References boost::chrono::ios_state_ptr< Final, T >::ios_.

template<typename Final , typename T >
boost::chrono::ios_state_ptr< Final, T >::operator std::ios_base & ( ) const
inline

Implicit conversion to the ios_base const.

References boost::chrono::ios_state_ptr< Final, T >::ios_.

template<typename Final , typename T >
T& boost::chrono::ios_state_ptr< Final, T >::operator* ( )
inline

as if return *get();

Returns
a reference to the retrieved state. The behavior is undefined if get()==0.
template<typename Final , typename T >
T const& boost::chrono::ios_state_ptr< Final, T >::operator* ( ) const
inline

as if return *get();

Returns
a reference to the retrieved state. The behavior is undefined if get()==0.
template<typename Final , typename T >
T* boost::chrono::ios_state_ptr< Final, T >::operator-> ( )
inline

as if return get();

Returns
the retrieved pointer.
template<typename Final , typename T >
T const* boost::chrono::ios_state_ptr< Final, T >::operator-> ( ) const
inline

as if return get();

Returns
the retrieved pointer.
template<typename Final , typename T >
T* boost::chrono::ios_state_ptr< Final, T >::release ( )
inline

reset the current pointer after storing in a temporary variable the pointer to the current state.

Returns
the stored state pointer.

References boost::chrono::ios_state_ptr< Final, T >::reset(), and T.

template<typename Final , typename T >
void boost::chrono::ios_state_ptr< Final, T >::reset ( T new_ptr = 0)
inline

Member Data Documentation


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