libzypp  13.10.6
zypp::DefaultOption< _Tp > Struct Template Reference

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

Inheritance diagram for zypp::DefaultOption< _Tp >:
zypp::Option< _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 (const value_type &initial_r)
 
void restoreToDefault ()
 Reset value to the current default. More...
 
void restoreToDefault (const value_type &newval_r)
 Reset value to a new default. More...
 
const value_typegetDefault () const
 Get the current default value. More...
 
void setDefault (const value_type &newval_r)
 Set a new default value. More...
 
- Public Member Functions inherited from zypp::Option< _Tp >
 Option (const value_type &initial_r)
 No default ctor, explicit initialisation! More...
 
const value_typeget () const
 Get the value. More...
 
 operator const value_type & () const
 Autoconversion to value_type. More...
 
void set (const value_type &newval_r)
 Set a new value. More...
 
value_typeref ()
 Non-const reference to 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 250 of file ZConfig.cc.

Member Typedef Documentation

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

Definition at line 252 of file ZConfig.cc.

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

Definition at line 253 of file ZConfig.cc.

Constructor & Destructor Documentation

template<class _Tp>
zypp::DefaultOption< _Tp >::DefaultOption ( const value_type initial_r)
inline

Definition at line 255 of file ZConfig.cc.

Member Function Documentation

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

Reset value to the current default.

Definition at line 260 of file ZConfig.cc.

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

Reset value to a new default.

Definition at line 264 of file ZConfig.cc.

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

Get the current default value.

Definition at line 268 of file ZConfig.cc.

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

Set a new default value.

Definition at line 272 of file ZConfig.cc.

Member Data Documentation

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

Definition at line 276 of file ZConfig.cc.


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