libzypp 17.31.23
|
Helper managing a container of raw values with transformed representation. More...
#include <base/ValueTransform.h>
Public Types | |
typedef TContainer | Container |
typedef TUnaryFunction | Transformator |
typedef Container::size_type | size_type |
typedef Container::value_type | RawType |
typedef std::result_of< Transformator(RawType)>::type | TransformedType |
typedef Container::const_iterator | RawConstIterator |
typedef transform_iterator< Transformator, typename Container::const_iterator > | TransformedConstIterator |
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. | |
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 91 of file ValueTransform.h.
typedef TContainer zypp::base::ContainerTransform< TContainer, TUnaryFunction >::Container |
Definition at line 93 of file ValueTransform.h.
typedef TUnaryFunction zypp::base::ContainerTransform< TContainer, TUnaryFunction >::Transformator |
Definition at line 94 of file ValueTransform.h.
typedef Container::size_type zypp::base::ContainerTransform< TContainer, TUnaryFunction >::size_type |
Definition at line 95 of file ValueTransform.h.
typedef Container::value_type zypp::base::ContainerTransform< TContainer, TUnaryFunction >::RawType |
Definition at line 96 of file ValueTransform.h.
typedef std::result_of<Transformator(RawType)>::type zypp::base::ContainerTransform< TContainer, TUnaryFunction >::TransformedType |
Definition at line 97 of file ValueTransform.h.
typedef Container::const_iterator zypp::base::ContainerTransform< TContainer, TUnaryFunction >::RawConstIterator |
Definition at line 118 of file ValueTransform.h.
typedef transform_iterator<Transformator, typename Container::const_iterator> zypp::base::ContainerTransform< TContainer, TUnaryFunction >::TransformedConstIterator |
Definition at line 135 of file ValueTransform.h.
|
inline |
Definition at line 100 of file ValueTransform.h.
|
inlineexplicit |
Definition at line 103 of file ValueTransform.h.
|
inline |
Definition at line 107 of file ValueTransform.h.
|
inline |
Definition at line 112 of file ValueTransform.h.
|
inline |
Definition at line 115 of file ValueTransform.h.
|
inline |
Definition at line 120 of file ValueTransform.h.
|
inline |
Definition at line 123 of file ValueTransform.h.
|
inline |
Get the raw value.
Definition at line 127 of file ValueTransform.h.
|
inline |
Set the raw value.
Definition at line 131 of file ValueTransform.h.
|
inline |
Definition at line 137 of file ValueTransform.h.
|
inline |
Definition at line 140 of file ValueTransform.h.
|
inline |
Return copy with transformed variables (expensive)
Definition at line 144 of file ValueTransform.h.
|
inline |
Return a transformed copy of an arbitrary RawType.
Definition at line 148 of file ValueTransform.h.
|
inline |
Return a transformed copy of a RawConstIterator raw value.
Definition at line 152 of file ValueTransform.h.
|
inline |
Return the transformator.
Definition at line 156 of file ValueTransform.h.
|
private |
Definition at line 160 of file ValueTransform.h.
|
private |
Definition at line 161 of file ValueTransform.h.