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

#include <bslfmt_mockformatcontext.h>

Detailed Description

template<class t_CHAR>
class bslfmt::MockFormatContext_Iterator< t_CHAR >

This class template provides an output iterator to the MockFormatContext output buffer allowing appending formatted data.

See bslfmt_mockformatcontext

Public Types

typedef std::ptrdiff_t difference_type
 
typedef t_CHAR value_type
 
typedef t_CHAR * pointer
 
typedef t_CHAR & reference
 
typedef std::output_iterator_tag iterator_category
 

Public Member Functions

 MockFormatContext_Iterator (t_CHAR *ptr, t_CHAR *max)
 
MockFormatContext_Iteratoroperator++ ()
 
MockFormatContext_Iterator operator++ (int)
 
t_CHAR & operator* () const
 
t_CHAR * rawPointer () const
 

Member Typedef Documentation

◆ difference_type

template<class t_CHAR >
typedef std::ptrdiff_t bslfmt::MockFormatContext_Iterator< t_CHAR >::difference_type

◆ iterator_category

template<class t_CHAR >
typedef std::output_iterator_tag bslfmt::MockFormatContext_Iterator< t_CHAR >::iterator_category

◆ pointer

template<class t_CHAR >
typedef t_CHAR* bslfmt::MockFormatContext_Iterator< t_CHAR >::pointer

◆ reference

template<class t_CHAR >
typedef t_CHAR& bslfmt::MockFormatContext_Iterator< t_CHAR >::reference

◆ value_type

template<class t_CHAR >
typedef t_CHAR bslfmt::MockFormatContext_Iterator< t_CHAR >::value_type

Constructor & Destructor Documentation

◆ MockFormatContext_Iterator()

template<class t_CHAR >
bslfmt::MockFormatContext_Iterator< t_CHAR >::MockFormatContext_Iterator ( t_CHAR *  ptr,
t_CHAR *  max 
)

Create an iterator, pointing to the specified ptr and having the specified max as the end of the buffer available for output.

Precondition
The behavior is undefined unless max >=ptr.

Member Function Documentation

◆ operator*()

template<class t_CHAR >
t_CHAR & bslfmt::MockFormatContext_Iterator< t_CHAR >::operator* ( ) const

Return a reference to the character referred to by this iterator.

◆ operator++() [1/2]

template<class t_CHAR >
MockFormatContext_Iterator< t_CHAR > & bslfmt::MockFormatContext_Iterator< t_CHAR >::operator++ ( )

Increment this object to refer to the next character in the output buffer. Throw bslfmt::format_error if the iterator goes beyond the allowed buffer bounds.

◆ operator++() [2/2]

template<class t_CHAR >
MockFormatContext_Iterator< t_CHAR > bslfmt::MockFormatContext_Iterator< t_CHAR >::operator++ ( int  )

Copy this iterator, increment it, and return by value the copy that was made prior the increment.

◆ rawPointer()

template<class t_CHAR >
t_CHAR * bslfmt::MockFormatContext_Iterator< t_CHAR >::rawPointer ( ) const

Return a pointer pointing to the character referred to by this iterator.


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