libzypp 17.37.17
|
Helper managing a container of raw values with transformed representation. More...
#include <zypp/base/ValueTransform.h>
Public Types | |
using | Container = TContainer |
using | Transformator = TUnaryFunction |
using | size_type = typename Container::size_type |
using | RawType = typename Container::value_type |
using | TransformedType = std::result_of_t<Transformator (RawType)> |
using | RawConstIterator = typename Container::const_iterator |
using | TransformedConstIterator = transform_iterator<Transformator, typename Container::const_iterator> |
Public Member Functions | |
ContainerTransform () | |
ContainerTransform (Container raw_r) | |
ContainerTransform (Container raw_r, Transformator transform_r) | |
bool | empty () const |
size_type | size () const |
RawConstIterator | rawBegin () const |
RawConstIterator | rawEnd () const |
const Container & | raw () const |
Get the raw value. | |
Container & | raw () |
Set the raw value. | |
void | clear () |
Clear the container. | |
TransformedConstIterator | transformedBegin () const |
TransformedConstIterator | transformedEnd () const |
Container | transformed () const |
Return copy with transformed variables (expensive) | |
TransformedType | transformed (const RawType &raw_r) const |
Return a transformed copy of an arbitrary RawType. | |
TransformedType | transformed (const RawConstIterator &rawIter_r) const |
Return a transformed copy of a RawConstIterator raw value. | |
const Transformator & | transformator () const |
Return the transformator. |
Private Attributes | |
Container | _raw |
Transformator | _transform |
Helper managing a container of raw values with transformed representation.
This helper enforces to explicitly state wheter you are using the raw or the variable replaced value. Usually you set raw
and get transformed
(uness writing raw
to some config file).
Offers iterating over transformed strings in the list.
Definition at line 95 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::Container = TContainer |
Definition at line 97 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::Transformator = TUnaryFunction |
Definition at line 98 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::size_type = typename Container::size_type |
Definition at line 99 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::RawType = typename Container::value_type |
Definition at line 100 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::TransformedType = std::result_of_t<Transformator (RawType)> |
Definition at line 102 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::RawConstIterator = typename Container::const_iterator |
Definition at line 125 of file ValueTransform.h.
using zypp::base::ContainerTransform< TContainer, TUnaryFunction >::TransformedConstIterator = transform_iterator<Transformator, typename Container::const_iterator> |
Definition at line 146 of file ValueTransform.h.
|
inline |
Definition at line 107 of file ValueTransform.h.
|
inlineexplicit |
Definition at line 110 of file ValueTransform.h.
|
inline |
Definition at line 114 of file ValueTransform.h.
|
inline |
Definition at line 119 of file ValueTransform.h.
|
inline |
Definition at line 122 of file ValueTransform.h.
|
inline |
Definition at line 127 of file ValueTransform.h.
|
inline |
Definition at line 130 of file ValueTransform.h.
|
inline |
Get the raw value.
Definition at line 134 of file ValueTransform.h.
|
inline |
Set the raw value.
Definition at line 138 of file ValueTransform.h.
|
inline |
Clear the container.
Definition at line 142 of file ValueTransform.h.
|
inline |
Definition at line 148 of file ValueTransform.h.
|
inline |
Definition at line 151 of file ValueTransform.h.
|
inline |
Return copy with transformed variables (expensive)
Definition at line 155 of file ValueTransform.h.
|
inline |
Return a transformed copy of an arbitrary RawType.
Definition at line 159 of file ValueTransform.h.
|
inline |
Return a transformed copy of a RawConstIterator raw value.
Definition at line 163 of file ValueTransform.h.
|
inline |
Return the transformator.
Definition at line 167 of file ValueTransform.h.
|
private |
Definition at line 171 of file ValueTransform.h.
|
private |
Definition at line 172 of file ValueTransform.h.