|
BDE 4.39.x Production Release
|
#include <bslfmt_format_imp.h>
This component-private type provides a stateful output iterator whose purpose is to count the number of characters written for use by the formatted_size free functions. It holds an underlying output iterator (to which writes are delegated), a maximum character count permitted and a current character count to keep track of how many characters would be written if there were no limit.
Public Types | |
| typedef bsl::output_iterator_tag | iterator_category |
| typedef t_DIFF_TYPE | difference_type |
| typedef t_VALUE_TYPE | value_type |
| typedef void | reference |
| typedef void | pointer |
Public Member Functions | |
| Format_Imp_TruncatingIterator (t_ITERATOR iterator, t_DIFF_TYPE limit) | |
| Format_Imp_TruncatingIterator & | operator* () |
| void | operator= (t_VALUE_TYPE x) |
| Format_Imp_TruncatingIterator & | operator++ () |
| t_DIFF_TYPE | count () const |
| t_ITERATOR | underlying () const |
| typedef t_DIFF_TYPE bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::difference_type |
| typedef bsl::output_iterator_tag bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::iterator_category |
| typedef void bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::pointer |
| typedef void bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::reference |
| typedef t_VALUE_TYPE bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::value_type |
| bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::Format_Imp_TruncatingIterator | ( | t_ITERATOR | iterator, |
| t_DIFF_TYPE | limit | ||
| ) |
Create a instance containing a copy of the specified iterator as underlying iterater with the maximum character count set to the specified limit and the current character count set to zero.
| t_DIFF_TYPE bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::count | ( | ) | const |
Return the current character count.
operator= regardless of whether the limit has been breached. | Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE > & bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::operator* | ( | ) |
Do nothing and return a reference to this object. This is included to ensure compliance with the C++ Standard's LegacyOutputIterator requirements.
| Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE > & bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::operator++ | ( | ) |
Do nothing and return a reference to this object. This is included to ensure compliance with the C++ Standard's LegacyOutputIterator requirements.
| void bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::operator= | ( | t_VALUE_TYPE | x | ) |
Increment the current character count. If the current character count is less than the maximum character count (set on construction), assign the specified x to the stored underlying iterator and increment the stored underlying iterator.
| t_ITERATOR bslfmt::Format_Imp_TruncatingIterator< t_ITERATOR, t_VALUE_TYPE, t_DIFF_TYPE >::underlying | ( | ) | const |
Return the underlying iterator.