libzypp 17.31.23
|
Helper managing raw values with transformed representation. More...
#include <base/ValueTransform.h>
Public Types | |
typedef Tp | RawType |
typedef TUnaryFunction | Transformator |
typedef std::result_of< Transformator(RawType)>::type | TransformedType |
Public Member Functions | |
ValueTransform () | |
ValueTransform (RawType raw_r) | |
ValueTransform (RawType raw_r, Transformator transform_r) | |
const RawType & | raw () const |
Get the raw value. | |
RawType & | raw () |
Set the raw value. | |
TransformedType | transformed () const |
Return a transformed copy of the raw value. | |
TransformedType | transformed (const RawType &raw_r) const |
Return a transformed copy of an arbitrary RawType. | |
const Transformator & | transformator () const |
Return the transformator. | |
Private Attributes | |
RawType | _raw |
Transformator | _transform |
Helper managing raw values with transformed representation.
This helper enforces to explicitly state whether you are using the raw or the variable replaced value. Usually you set raw
and get transformed
(unless writing raw
to some config file).
Used e.g. vor variable replaced config strings.
Definition at line 35 of file ValueTransform.h.
typedef Tp zypp::base::ValueTransform< Tp, TUnaryFunction >::RawType |
Definition at line 37 of file ValueTransform.h.
typedef TUnaryFunction zypp::base::ValueTransform< Tp, TUnaryFunction >::Transformator |
Definition at line 38 of file ValueTransform.h.
typedef std::result_of<Transformator(RawType)>::type zypp::base::ValueTransform< Tp, TUnaryFunction >::TransformedType |
Definition at line 39 of file ValueTransform.h.
|
inline |
Definition at line 42 of file ValueTransform.h.
|
inlineexplicit |
Definition at line 45 of file ValueTransform.h.
|
inline |
Definition at line 49 of file ValueTransform.h.
|
inline |
Get the raw value.
Definition at line 55 of file ValueTransform.h.
|
inline |
Set the raw value.
Definition at line 59 of file ValueTransform.h.
|
inline |
Return a transformed copy of the raw value.
Definition at line 64 of file ValueTransform.h.
|
inline |
Return a transformed copy of an arbitrary RawType.
Definition at line 68 of file ValueTransform.h.
|
inline |
Return the transformator.
Definition at line 72 of file ValueTransform.h.
|
private |
Definition at line 76 of file ValueTransform.h.
|
private |
Definition at line 77 of file ValueTransform.h.