BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt::MockFormatContext< t_CHAR > Class Template Reference

#include <bslfmt_mockformatcontext.h>

Detailed Description

template<class t_CHAR>
class bslfmt::MockFormatContext< t_CHAR >

This unconstrained (value-semantic) class provides an access to the current state of the format operation and is used for testing bsl::formatter specializations.

See bslfmt_mockformatcontext

Public Types

typedef basic_format_arg< basic_format_context< t_CHAR *, t_CHAR > > Arg
 
typedef MockFormatContext_Iterator< t_CHAR > iterator
 
typedef t_CHAR char_type
 

Public Member Functions

template<class t_ARG0 >
 MockFormatContext (const t_ARG0 &arg_0)
 
template<class t_ARG0 , class t_ARG1 >
 MockFormatContext (const t_ARG0 &arg_0, const t_ARG1 &arg_1)
 
template<class t_ARG0 , class t_ARG1 , class t_ARG2 >
 MockFormatContext (const t_ARG0 &arg_0, const t_ARG1 &arg_1, const t_ARG2 &arg_2)
 
template<class t_ARG0 , class t_ARG1 , class t_ARG2 , class t_ARG3 >
 MockFormatContext (const t_ARG0 &arg_0, const t_ARG1 &arg_1, const t_ARG2 &arg_2, const t_ARG3 &arg_3)
 
void advance_to (iterator it)
 
Arg arg (size_t id) const BSLS_KEYWORD_NOEXCEPT
 
iterator out () const
 
bsl::basic_string_view< t_CHAR > finalString () const
 

Member Typedef Documentation

◆ Arg

template<class t_CHAR >
typedef basic_format_arg<basic_format_context<t_CHAR *, t_CHAR> > bslfmt::MockFormatContext< t_CHAR >::Arg

◆ char_type

template<class t_CHAR >
typedef t_CHAR bslfmt::MockFormatContext< t_CHAR >::char_type

◆ iterator

template<class t_CHAR >
typedef MockFormatContext_Iterator<t_CHAR> bslfmt::MockFormatContext< t_CHAR >::iterator

Constructor & Destructor Documentation

◆ MockFormatContext() [1/4]

template<class t_CHAR >
template<class t_ARG0 >
bslfmt::MockFormatContext< t_CHAR >::MockFormatContext ( const t_ARG0 &  arg_0)

Create an object having the specified arg_0 as an argument.

◆ MockFormatContext() [2/4]

template<class t_CHAR >
template<class t_ARG0 , class t_ARG1 >
bslfmt::MockFormatContext< t_CHAR >::MockFormatContext ( const t_ARG0 &  arg_0,
const t_ARG1 &  arg_1 
)

Create an object having the specified arg_0 and arg_1 as arguments.

◆ MockFormatContext() [3/4]

template<class t_CHAR >
template<class t_ARG0 , class t_ARG1 , class t_ARG2 >
bslfmt::MockFormatContext< t_CHAR >::MockFormatContext ( const t_ARG0 &  arg_0,
const t_ARG1 &  arg_1,
const t_ARG2 &  arg_2 
)

Create an object having the specified arg_0, arg_1 and arg_2 as arguments.

◆ MockFormatContext() [4/4]

template<class t_CHAR >
template<class t_ARG0 , class t_ARG1 , class t_ARG2 , class t_ARG3 >
bslfmt::MockFormatContext< t_CHAR >::MockFormatContext ( const t_ARG0 &  arg_0,
const t_ARG1 &  arg_1,
const t_ARG2 &  arg_2,
const t_ARG3 &  arg_3 
)

Create an object having the specified arg_0, arg_1, arg_2 and arg_3 as arguments.

Member Function Documentation

◆ advance_to()

template<class t_CHAR >
void bslfmt::MockFormatContext< t_CHAR >::advance_to ( iterator  it)

Advance the output iterator to the position referred by the specified it.

◆ arg()

template<class t_CHAR >
MockFormatContext< t_CHAR >::Arg bslfmt::MockFormatContext< t_CHAR >::arg ( size_t  id) const

Return the argument with the specified id or the default constructed object if there is no argument with such id.

◆ finalString()

template<class t_CHAR >
bsl::basic_string_view< t_CHAR > bslfmt::MockFormatContext< t_CHAR >::finalString ( ) const

Return output string.

◆ out()

template<class t_CHAR >
MockFormatContext< t_CHAR >::iterator bslfmt::MockFormatContext< t_CHAR >::out ( ) const

Return this object's output iterator.


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