OpenTTD Source 20260304-master-g1baaa74679
InPlaceBuilder::back_insert_iterator Class Reference

Implementation of std::back_insert_iterator for non-growing destination buffer. More...

#include <string_inplace.hpp>

Public Types

using value_type = void
 C++ specification trait 'value_type' of std::back_insert_iterator.
using difference_type = void
 C++ specification trait 'difference_type' of std::back_insert_iterator.
using iterator_category = std::output_iterator_tag
 C++ specification trait 'iterator_category' of std::back_insert_iterator.
using pointer = void
 C++ specification trait 'pointer' of std::back_insert_iterator.
using reference = void
 C++ specification trait 'reference' of std::back_insert_iterator.

Public Member Functions

 back_insert_iterator (InPlaceBuilder &parent)
 Create the iterator.
back_insert_iteratoroperator++ ()
back_insert_iterator operator++ (int)
back_insert_iteratoroperator* ()
back_insert_iteratoroperator= (char value)

Private Attributes

InPlaceBuilderparent = nullptr
 The builder we belong to.

Detailed Description

Implementation of std::back_insert_iterator for non-growing destination buffer.

Definition at line 73 of file string_inplace.hpp.

Member Typedef Documentation

◆ difference_type

C++ specification trait 'difference_type' of std::back_insert_iterator.

Definition at line 77 of file string_inplace.hpp.

◆ iterator_category

C++ specification trait 'iterator_category' of std::back_insert_iterator.

Definition at line 78 of file string_inplace.hpp.

◆ pointer

C++ specification trait 'pointer' of std::back_insert_iterator.

Definition at line 79 of file string_inplace.hpp.

◆ reference

C++ specification trait 'reference' of std::back_insert_iterator.

Definition at line 80 of file string_inplace.hpp.

◆ value_type

C++ specification trait 'value_type' of std::back_insert_iterator.

Definition at line 76 of file string_inplace.hpp.

Constructor & Destructor Documentation

◆ back_insert_iterator()

InPlaceBuilder::back_insert_iterator::back_insert_iterator ( InPlaceBuilder & parent)
inline

Create the iterator.

Parameters
parentThe builder to insert data to.

Definition at line 86 of file string_inplace.hpp.

References InPlaceBuilder::InPlaceBuilder(), and parent.

Member Function Documentation

◆ operator*()

back_insert_iterator & InPlaceBuilder::back_insert_iterator::operator* ( )
inline

Definition at line 90 of file string_inplace.hpp.

◆ operator++() [1/2]

back_insert_iterator & InPlaceBuilder::back_insert_iterator::operator++ ( )
inline

Definition at line 88 of file string_inplace.hpp.

◆ operator++() [2/2]

back_insert_iterator InPlaceBuilder::back_insert_iterator::operator++ ( int )
inline

Definition at line 89 of file string_inplace.hpp.

◆ operator=()

back_insert_iterator & InPlaceBuilder::back_insert_iterator::operator= ( char value)
inline

Definition at line 92 of file string_inplace.hpp.

Field Documentation

◆ parent

InPlaceBuilder* InPlaceBuilder::back_insert_iterator::parent = nullptr
private

The builder we belong to.

Definition at line 74 of file string_inplace.hpp.

Referenced by back_insert_iterator().


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