CAF  0.17.3
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< 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. More...
virtual void set_default (Object &object) const =0
 Restores the default value for this field in object. More...
virtual void parse_cli (string_parser_state &ps, Object &object, const char *char_blacklist="") 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.

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.


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