CAF 0.17.6
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
caf::config_value_field< Object > Class Template Referenceabstract

Describes a field of Object. More...

#include <config_value_field.hpp>

Inherited by caf::detail::config_value_field_base< T, std::tuple_element< Pos, T >::type >, caf::detail::config_value_field_base< config_value_field_trait< Get >::object_type, config_value_field_trait< Get >::value_type >, and caf::detail::config_value_field_base< Object, Value >.

Public Types

using object_type = Object
 

Public Member Functions

virtual bool has_default () const noexcept=0
 Returns whether this field has a default value.
 
virtual string_view name () const noexcept=0
 Returns the name of this field.
 
virtual config_value get (const Object &object) const =0
 Returns the value of this field in object as config value.
 
virtual bool valid_input (const config_value &x) const =0
 Returns whether calling set with x would succeed.
 
virtual bool set (Object &object, const config_value &x) const =0
 Tries to set this field in object to x.
 
virtual void set_default (Object &object) const =0
 Restores the default value for this field in object.
 
virtual void parse_cli (string_parser_state &ps, Object &object, bool is_nested) const =0
 Parses the content for this field in object from ps.
 

Detailed Description

template<class Object>
class caf::config_value_field< Object >

Describes a field of Object.

Member Function Documentation

◆ set()

template<class Object >
virtual bool caf::config_value_field< Object >::set ( Object object,
const config_value x 
) const
pure virtual

Tries to set this field in object to x.

Returns
true on success, false otherwise.

◆ set_default()

template<class Object >
virtual void caf::config_value_field< Object >::set_default ( Object object) const
pure virtual

Restores the default value for this field in object.

Precondition
has_default()

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