libzypp  17.25.8
zypp::DefaultOption< Tp > Struct Template Reference

Mutable option with initial value also remembering a config value. More...

Inheritance diagram for zypp::DefaultOption< Tp >:

Public Types

typedef Tp value_type
 
typedef Option< Tp > option_type
 
- Public Types inherited from zypp::Option< Tp >
typedef Tp value_type
 

Public Member Functions

 DefaultOption (value_type initial_r)
 
DefaultOptionoperator= (value_type newval_r)
 
void restoreToDefault ()
 Reset value to the current default. More...
 
void restoreToDefault (value_type newval_r)
 Reset value to a new default. More...
 
const value_typegetDefault () const
 Get the current default value. More...
 
void setDefault (value_type newval_r)
 Set a new default value. More...
 
- Public Member Functions inherited from zypp::Option< Tp >
 Option (value_type initial_r)
 No default ctor, explicit initialisation! More...
 
Optionoperator= (value_type newval_r)
 
const value_typeget () const
 Get the value. More...
 
 operator const value_type & () const
 Autoconversion to value_type. More...
 
void set (value_type newval_r)
 Set a new value. More...
 

Private Attributes

option_type _default
 

Detailed Description

template<class Tp>
struct zypp::DefaultOption< Tp >

Mutable option with initial value also remembering a config value.

Definition at line 264 of file ZConfig.cc.

Member Typedef Documentation

◆ value_type

template<class Tp >
typedef Tp zypp::DefaultOption< Tp >::value_type

Definition at line 266 of file ZConfig.cc.

◆ option_type

template<class Tp >
typedef Option<Tp> zypp::DefaultOption< Tp >::option_type

Definition at line 267 of file ZConfig.cc.

Constructor & Destructor Documentation

◆ DefaultOption()

template<class Tp >
zypp::DefaultOption< Tp >::DefaultOption ( value_type  initial_r)
inlineexplicit

Definition at line 269 of file ZConfig.cc.

Member Function Documentation

◆ operator=()

template<class Tp >
DefaultOption& zypp::DefaultOption< Tp >::operator= ( value_type  newval_r)
inline

Definition at line 274 of file ZConfig.cc.

◆ restoreToDefault() [1/2]

template<class Tp >
void zypp::DefaultOption< Tp >::restoreToDefault ( )
inline

Reset value to the current default.

Definition at line 278 of file ZConfig.cc.

◆ restoreToDefault() [2/2]

template<class Tp >
void zypp::DefaultOption< Tp >::restoreToDefault ( value_type  newval_r)
inline

Reset value to a new default.

Definition at line 282 of file ZConfig.cc.

◆ getDefault()

template<class Tp >
const value_type& zypp::DefaultOption< Tp >::getDefault ( ) const
inline

Get the current default value.

Definition at line 286 of file ZConfig.cc.

◆ setDefault()

template<class Tp >
void zypp::DefaultOption< Tp >::setDefault ( value_type  newval_r)
inline

Set a new default value.

Definition at line 290 of file ZConfig.cc.

Member Data Documentation

◆ _default

template<class Tp >
option_type zypp::DefaultOption< Tp >::_default
private

Definition at line 294 of file ZConfig.cc.


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