Castor3D 0.17.0
Multiplatform 3D engine
Classes | Typedefs | Functions
castor::format Namespace Reference

Classes

struct  BasePrefixerT
 Contains an std::basic_string< CharT > operator()() member function which generates the Prefix. More...
 
class  BasicIndentBufferManagerT
 Holds associated streams and stream buffers. More...
 
struct  BasicIndentBufferT
 Stream buffer used by streams to indent lines. More...
 
struct  BasicLinePrefixTraitsT
 Prefixes lines with their index. More...
 
class  BasicPrefixBufferManagerT
 Holds associated streams and stream buffers. More...
 
struct  BasicPrefixBufferT
 Stream buffer used by streams to indent lines. More...
 
struct  BasicPrefixTraitsT
 Default Prefix traits. More...
 
struct  Indent
 

Typedefs

using SpaceIndentBuffer = BasicIndentBufferT< xchar >
 
using MbSpaceIndentBuffer = BasicIndentBufferT< char >
 
using WSpaceIndentBuffer = BasicIndentBufferT< wchar_t >
 
using TabIndentBuffer = BasicIndentBufferT< xchar, cuT( '\t' ) >
 
using MbTabIndentBuffer = BasicIndentBufferT< char, '\t' >
 
using WTabIndentBuffer = BasicIndentBufferT< wchar_t, L'\t' >
 
using IndentBufferManager = BasicIndentBufferManagerT< xchar, std::char_traits< xchar > >
 
using MbIndentBufferManager = BasicIndentBufferManagerT< char, std::char_traits< char > >
 
using WIndentBufferManager = BasicIndentBufferManagerT< wchar_t, std::char_traits< wchar_t > >
 
using Prefix = BasePrefixerT< xchar, BasicPrefixTraitsT< xchar > >
 
using MbPrefix = BasePrefixerT< char, BasicPrefixTraitsT< char > >
 
using WPrefix = BasePrefixerT< wchar_t, BasicPrefixTraitsT< wchar_t > >
 
using LinePrefix = BasePrefixerT< xchar, BasicLinePrefixTraitsT< xchar > >
 
using MbLinePrefix = BasePrefixerT< char, BasicLinePrefixTraitsT< char > >
 
using WLinePrefix = BasePrefixerT< wchar_t, BasicLinePrefixTraitsT< wchar_t > >
 
using PrefixBuffer = BasicPrefixBufferT< Prefix, xchar >
 
using MbPrefixBuffer = BasicPrefixBufferT< MbPrefix, char >
 
using WPrefixBuffer = BasicPrefixBufferT< WPrefix, wchar_t >
 
using LinePrefixBuffer = BasicPrefixBufferT< LinePrefix, xchar >
 
using MbLinePrefixBuffer = BasicPrefixBufferT< LinePrefix, char >
 
using WLinePrefixBuffer = BasicPrefixBufferT< WLinePrefix, wchar_t >
 

Functions

long & indentValue (std::ios_base &ios)
 Retrieves the indentation value for the given stream.
 
long getIndent (std::ios_base &ios)
 Retrieves the indentation value for the given stream.
 
void setIndent (std::ios_base &ios, unsigned int val)
 Defines the indentation value for given stream.
 
template<typename CharT , typename BufferT = BasicIndentBufferT< CharT >, typename BufferManagerType = BasicIndentBufferManagerT< CharT >>
BufferT * installIndentBuffer (std::basic_ostream< CharT > &stream)
 Initializes the stream in order to indent it.
 
template<typename CharT >
void callback (std::ios_base::event ev, std::ios_base &ios, CU_UnusedParam(int, x))
 The stream events callback.
 
template<typename PrefixT , typename CharT , typename BufferT = BasicPrefixBufferT< BasePrefixerT< CharT, PrefixT >, CharT >, typename BufferManagerType = BasicPrefixBufferManagerT< BasePrefixerT< CharT, PrefixT >, CharT >>
BufferT * installPrefixBuffer (std::basic_ostream< CharT > &stream)
 Initializes the stream in order to indent it.
 
template<typename PrefixT , typename CharT >
void callback (std::ios_base::event ev, std::ios_base &ios, CU_UnusedParam(int, x))
 The stream events callback.
 

Typedef Documentation

◆ IndentBufferManager

◆ LinePrefix

◆ LinePrefixBuffer

◆ MbIndentBufferManager

using castor::format::MbIndentBufferManager = BasicIndentBufferManagerT< char, std::char_traits< char > >

◆ MbLinePrefix

◆ MbLinePrefixBuffer

◆ MbPrefix

◆ MbPrefixBuffer

◆ MbSpaceIndentBuffer

◆ MbTabIndentBuffer

◆ Prefix

◆ PrefixBuffer

◆ SpaceIndentBuffer

◆ TabIndentBuffer

◆ WIndentBufferManager

using castor::format::WIndentBufferManager = BasicIndentBufferManagerT< wchar_t, std::char_traits< wchar_t > >

◆ WLinePrefix

◆ WLinePrefixBuffer

◆ WPrefix

◆ WPrefixBuffer

◆ WSpaceIndentBuffer

◆ WTabIndentBuffer

Function Documentation

◆ callback() [1/2]

template<typename CharT >
void castor::format::callback ( std::ios_base::event ev,
std::ios_base & ios,
CU_UnusedParam(int, x)  )
inline

The stream events callback.

References getIndent(), and castor::format::BasicIndentBufferManagerT< CharT, traits >::instance().

Here is the call graph for this function:

◆ callback() [2/2]

template<typename PrefixT , typename CharT >
void castor::format::callback ( std::ios_base::event ev,
std::ios_base & ios,
CU_UnusedParam(int, x)  )
inline

The stream events callback.

◆ getIndent()

long castor::format::getIndent ( std::ios_base & ios)
inline

Retrieves the indentation value for the given stream.

Parameters
[in]iosThe stream
Returns
The indentation value

References indentValue().

Referenced by callback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ indentValue()

long & castor::format::indentValue ( std::ios_base & ios)
inline

Retrieves the indentation value for the given stream.

Parameters
[in]iosThe stream
Returns
A reference to the current indentation value

Referenced by getIndent(), and setIndent().

Here is the caller graph for this function:

◆ installIndentBuffer()

template<typename CharT , typename BufferT = BasicIndentBufferT< CharT >, typename BufferManagerType = BasicIndentBufferManagerT< CharT >>
BufferT * castor::format::installIndentBuffer ( std::basic_ostream< CharT > & stream)
inline

Initializes the stream in order to indent it.

Parameters
[in]streamThe stream

◆ installPrefixBuffer()

template<typename PrefixT , typename CharT , typename BufferT = BasicPrefixBufferT< BasePrefixerT< CharT, PrefixT >, CharT >, typename BufferManagerType = BasicPrefixBufferManagerT< BasePrefixerT< CharT, PrefixT >, CharT >>
BufferT * castor::format::installPrefixBuffer ( std::basic_ostream< CharT > & stream)
inline

Initializes the stream in order to indent it.

Parameters
[in]streamThe stream

◆ setIndent()

void castor::format::setIndent ( std::ios_base & ios,
unsigned int val )
inline

Defines the indentation value for given stream.

Parameters
[in]iosThe stream
[in]valThe new indentation value

References indentValue().

Here is the call graph for this function: