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

Classes

struct  BasePrefixer
 Contains an std::basic_string< char_type > operator()() member function which generates the Prefix. More...
 
struct  BasicIndentBuffer
 Stream buffer used by streams to indent lines. More...
 
class  BasicIndentBufferManager
 Holds associated streams and stream buffers. More...
 
struct  BasicLinePrefixTraits
 Prefixes lines with their index. More...
 
struct  BasicPrefixBuffer
 Stream buffer used by streams to indent lines. More...
 
class  BasicPrefixBufferManager
 Holds associated streams and stream buffers. More...
 
struct  BasicPrefixTraits
 Default Prefix traits. More...
 
struct  Indent
 

Typedefs

using SpaceIndentBuffer = BasicIndentBuffer< char >
 
using WSpaceIndentBuffer = BasicIndentBuffer< wchar_t >
 
using TabIndentBuffer = BasicIndentBuffer< char, '\t' >
 
using WTabIndentBuffer = BasicIndentBuffer< wchar_t, L'\t' >
 
using IndentBufferManager = BasicIndentBufferManager< char, std::char_traits< char > >
 
using WIndentBufferManager = BasicIndentBufferManager< wchar_t, std::char_traits< wchar_t > >
 
using Prefix = BasePrefixer< char, BasicPrefixTraits< char > >
 
using WPrefix = BasePrefixer< wchar_t, BasicPrefixTraits< wchar_t > >
 
using LinePrefix = BasePrefixer< char, BasicLinePrefixTraits< char > >
 
using WLinePrefix = BasePrefixer< wchar_t, BasicLinePrefixTraits< wchar_t > >
 
using PrefixBuffer = BasicPrefixBuffer< Prefix, char >
 
using WPrefixBuffer = BasicPrefixBuffer< WPrefix, wchar_t >
 
using LinePrefixBuffer = BasicPrefixBuffer< LinePrefix, char >
 
using WLinePrefixBuffer = BasicPrefixBuffer< 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 CharType , typename BufferType = BasicIndentBuffer< CharType >, typename BufferManagerType = BasicIndentBufferManager< CharType >>
BufferType * installIndentBuffer (std::basic_ostream< CharType > &stream)
 Initializes the stream in order to indent it.
 
template<typename CharType >
void callback (std::ios_base::event ev, std::ios_base &ios, CU_UnusedParam(int, x))
 The stream events callback.
 
template<typename PrefixType , typename CharType , typename BufferType = BasicPrefixBuffer< BasePrefixer< CharType, PrefixType >, CharType >, typename BufferManagerType = BasicPrefixBufferManager< BasePrefixer< CharType, PrefixType >, CharType >>
BufferType * installPrefixBuffer (std::basic_ostream< CharType > &stream)
 Initializes the stream in order to indent it.
 
template<typename PrefixType , typename CharType >
void callback (std::ios_base::event ev, std::ios_base &ios, CU_UnusedParam(int, x))
 The stream events callback.
 

Typedef Documentation

◆ IndentBufferManager

using castor::format::IndentBufferManager = BasicIndentBufferManager< char, std::char_traits< char > >

◆ LinePrefix

◆ LinePrefixBuffer

◆ Prefix

◆ PrefixBuffer

◆ SpaceIndentBuffer

◆ TabIndentBuffer

◆ WIndentBufferManager

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

◆ WLinePrefix

◆ WLinePrefixBuffer

◆ WPrefix

using castor::format::WPrefix = BasePrefixer< wchar_t, BasicPrefixTraits< wchar_t > >

◆ WPrefixBuffer

◆ WSpaceIndentBuffer

◆ WTabIndentBuffer

Function Documentation

◆ callback() [1/2]

template<typename CharType >
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::BasicIndentBufferManager< char_type, traits >::instance().

Here is the call graph for this function:

◆ callback() [2/2]

template<typename PrefixType , typename CharType >
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 CharType , typename BufferType = BasicIndentBuffer< CharType >, typename BufferManagerType = BasicIndentBufferManager< CharType >>
BufferType * castor::format::installIndentBuffer ( std::basic_ostream< CharType > & stream)
inline

Initializes the stream in order to indent it.

Parameters
[in]streamThe stream

◆ installPrefixBuffer()

template<typename PrefixType , typename CharType , typename BufferType = BasicPrefixBuffer< BasePrefixer< CharType, PrefixType >, CharType >, typename BufferManagerType = BasicPrefixBufferManager< BasePrefixer< CharType, PrefixType >, CharType >>
BufferType * castor::format::installPrefixBuffer ( std::basic_ostream< CharType > & 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: