LibSWOC++ 1.5.14
Solid Wall of C++
Loading...
Searching...
No Matches
swoc::TransformView< void, V > Class Template Reference

#include <TextView.h>

Collaboration diagram for swoc::TransformView< void, V >:
Collaboration graph

Public Types

using source_view_type = V
 Export source view type.
 
using source_value_type = std::remove_reference_t<decltype(*source_iterator{})>
 
using value_type = source_value_type
 Result type of calling the transform on an element of the source view.
 
using iterator = self_type
 This class serves as its own iterator.
 
using transform_type
 Export transform functor type.
 
using source_view_type
 Export source view type.
 
using source_value_type
 
using value_type
 Result type of calling the transform on an element of the source view.
 
using iterator
 This class serves as its own iterator.
 

Public Member Functions

 TransformView (source_view_type const &v)
 
 TransformView (self_type const &that)=default
 Copy constructor.
 
 TransformView (self_type &&that)=default
 Move constructor.
 
self_typeoperator= (self_type const &that)=default
 Copy assignment.
 
self_typeoperator= (self_type &&that)=default
 Move assignment.
 
bool operator== (self_type const &that) const
 Equality.
 
bool operator!= (self_type const &that) const
 Inequality.
 
value_type operator* () const
 Get the current element.
 
self_typeoperator++ ()
 Move to next element.
 
self_type operator++ (int)
 Move to next element.
 
bool empty () const
 Check if view is empty.
 
 operator bool () const
 Check if bool is not empty.
 
iterator begin () const
 Iterator to first transformed character.
 
iterator end () const
 Iterator past last transformed character.
 
 TransformView (transform_type &&xf, source_view_type const &v)
 
 TransformView (transform_type const &xf, source_view_type const &v)
 
 TransformView (self_type const &that)=default
 Copy constructor.
 
 TransformView (self_type &&that)=default
 Move constructor.
 
self_typeoperator= (self_type const &that)=default
 Copy assignment.
 
self_typeoperator= (self_type &&that)=default
 Move assignment.
 
bool operator== (self_type const &that) const
 Equality.
 
bool operator!= (self_type const &that) const
 Inequality.
 
value_type operator* () const
 Get the current element.
 
self_typeoperator++ ()
 Move to next element.
 
self_type operator++ (int)
 Move to next element.
 
bool empty () const
 Check if view is empty.
 
 operator bool () const
 Check if bool is not empty.
 
iterator begin () const
 Iterator to first transformed character.
 
iterator end () const
 Iterator past last transformed character.
 

Protected Member Functions

 TransformView (source_iterator &&limit)
 Special constructor for making an empty instance to serve as the end iterator.
 
 TransformView (transform_type &&xf, source_iterator &&limit)
 Special constructor for making an empty instance to serve as the end iterator.
 

Protected Attributes

source_iterator _spot
 Current location.
 
source_iterator _limit
 End marker.
 
transform_type _xf
 Per character transform functor.
 
source_iterator _spot
 Current location in the source view.
 
source_iterator _limit
 End of source view.
 

Detailed Description

template<typename V>
class swoc::TransformView< void, V >

Identity transform view.

Template Parameters
VThe source type.

This is a transform that returns the input unmodified. This is convenient when a transform is required in general but not in all cases.

Definition at line 1944 of file TextView.h.

Member Typedef Documentation

◆ iterator [1/2]

using swoc::TransformView< void, V >::iterator

This class serves as its own iterator.

Definition at line 1810 of file TextView.h.

◆ iterator [2/2]

template<typename V>
using swoc::TransformView< void, V >::iterator = self_type

This class serves as its own iterator.

Definition at line 1955 of file TextView.h.

◆ source_value_type [1/2]

using swoc::TransformView< void, V >::source_value_type

Definition at line 1806 of file TextView.h.

◆ source_value_type [2/2]

template<typename V>
using swoc::TransformView< void, V >::source_value_type = std::remove_reference_t<decltype(*source_iterator{})>

Definition at line 1951 of file TextView.h.

◆ source_view_type [1/2]

using swoc::TransformView< void, V >::source_view_type

Export source view type.

Definition at line 1805 of file TextView.h.

◆ source_view_type [2/2]

template<typename V>
using swoc::TransformView< void, V >::source_view_type = V

Export source view type.

Definition at line 1950 of file TextView.h.

◆ transform_type

using swoc::TransformView< void, V >::transform_type

Export transform functor type.

Definition at line 1804 of file TextView.h.

◆ value_type [1/2]

using swoc::TransformView< void, V >::value_type

Result type of calling the transform on an element of the source view.

Definition at line 1808 of file TextView.h.

◆ value_type [2/2]

template<typename V>
using swoc::TransformView< void, V >::value_type = source_value_type

Result type of calling the transform on an element of the source view.

Definition at line 1953 of file TextView.h.

Constructor & Destructor Documentation

◆ TransformView() [1/5]

template<typename V>
swoc::TransformView< void, V >::TransformView ( source_view_type const & v)
inline

Construct identity transform view from v.

Parameters
vSource view.

Definition at line 1961 of file TextView.h.

◆ TransformView() [2/5]

template<typename V>
swoc::TransformView< void, V >::TransformView ( source_iterator && limit)
inlineexplicitprotected

Special constructor for making an empty instance to serve as the end iterator.

Definition at line 2003 of file TextView.h.

◆ TransformView() [3/5]

swoc::TransformView< void, V >::TransformView ( transform_type && xf,
source_view_type const & v )

Construct a transform view using transform xf on source view v.

Parameters
xfTransform instance.
vSource view.

Definition at line 1817 of file TextView.h.

◆ TransformView() [4/5]

swoc::TransformView< void, V >::TransformView ( transform_type const & xf,
source_view_type const & v )

Construct a transform view using transform xf on source view v.

Parameters
xfTransform instance.
vSource view.

Definition at line 1824 of file TextView.h.

◆ TransformView() [5/5]

swoc::TransformView< void, V >::TransformView ( transform_type && xf,
source_iterator && limit )
inlineprotected

Special constructor for making an empty instance to serve as the end iterator.

Definition at line 1870 of file TextView.h.

Member Function Documentation

◆ begin() [1/2]

iterator swoc::TransformView< void, V >::begin ( ) const
inline

Iterator to first transformed character.

Definition at line 1855 of file TextView.h.

◆ begin() [2/2]

template<typename V>
auto swoc::TransformView< void, V >::begin ( ) const

Iterator to first transformed character.

Definition at line 2051 of file TextView.h.

◆ empty() [1/2]

bool swoc::TransformView< void, V >::empty ( ) const

Check if view is empty.

Definition at line 1849 of file TextView.h.

◆ empty() [2/2]

template<typename V>
bool swoc::TransformView< void, V >::empty ( ) const

Check if view is empty.

Definition at line 2041 of file TextView.h.

◆ end() [1/2]

iterator swoc::TransformView< void, V >::end ( ) const
inline

Iterator past last transformed character.

Definition at line 1860 of file TextView.h.

◆ end() [2/2]

template<typename V>
auto swoc::TransformView< void, V >::end ( ) const

Iterator past last transformed character.

Definition at line 2057 of file TextView.h.

◆ operator bool() [1/2]

swoc::TransformView< void, V >::operator bool ( ) const
explicit

Check if bool is not empty.

Definition at line 1851 of file TextView.h.

◆ operator bool() [2/2]

template<typename V>
swoc::TransformView< void, V >::operator bool ( ) const
explicit

Check if bool is not empty.

Definition at line 2045 of file TextView.h.

◆ operator!=() [1/2]

bool swoc::TransformView< void, V >::operator!= ( self_type const & that) const

Inequality.

Definition at line 1839 of file TextView.h.

◆ operator!=() [2/2]

template<typename V>
bool swoc::TransformView< void, V >::operator!= ( self_type const & that) const

Inequality.

Definition at line 2035 of file TextView.h.

◆ operator*() [1/2]

auto swoc::TransformView< void, V >::operator* ( ) const

Get the current element.

Definition at line 1842 of file TextView.h.

◆ operator*() [2/2]

template<typename V>
auto swoc::TransformView< void, V >::operator* ( ) const

Get the current element.

Definition at line 2008 of file TextView.h.

◆ operator++() [1/4]

auto swoc::TransformView< void, V >::operator++ ( )

Move to next element.

Definition at line 1844 of file TextView.h.

◆ operator++() [2/4]

template<typename V>
auto swoc::TransformView< void, V >::operator++ ( )

Move to next element.

Definition at line 2014 of file TextView.h.

◆ operator++() [3/4]

auto swoc::TransformView< void, V >::operator++ ( int )

Move to next element.

Definition at line 1846 of file TextView.h.

◆ operator++() [4/4]

template<typename V>
auto swoc::TransformView< void, V >::operator++ ( int )

Move to next element.

Definition at line 2021 of file TextView.h.

◆ operator==() [1/2]

bool swoc::TransformView< void, V >::operator== ( self_type const & that) const

Equality.

Definition at line 1837 of file TextView.h.

◆ operator==() [2/2]

template<typename V>
bool swoc::TransformView< void, V >::operator== ( self_type const & that) const

Equality.

Definition at line 2029 of file TextView.h.

Member Data Documentation

◆ _limit [1/2]

source_iterator swoc::TransformView< void, V >::_limit
protected

End of source view.

Definition at line 1867 of file TextView.h.

◆ _limit [2/2]

template<typename V>
source_iterator swoc::TransformView< void, V >::_limit
protected

End marker.

Definition at line 2000 of file TextView.h.

◆ _spot [1/2]

source_iterator swoc::TransformView< void, V >::_spot
protected

Current location in the source view.

Definition at line 1866 of file TextView.h.

◆ _spot [2/2]

template<typename V>
source_iterator swoc::TransformView< void, V >::_spot
protected

Current location.

Definition at line 1999 of file TextView.h.

◆ _xf

transform_type swoc::TransformView< void, V >::_xf
protected

Per character transform functor.

Definition at line 1865 of file TextView.h.


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