Loading...
Searching...
No Matches
caf::config_value_adaptor_field< T > Struct Template Reference

Describes a field of type T of an adaptor. More...

`#include <config_value_adaptor_field.hpp>`

## Public Types

using | value_type = T
| Type of the field.
using | predicate_function = bool (*)(const value_type&)
| Predicate function for verifying user input.

## Public Attributes

string_view | name
| Name of the field in configuration files and on the CLI.
optional< value_type > | default_value
| If set, makes the field optional in configuration files and on the CLI by assigning the default whenever the user provides no value.
predicate_function | predicate
| If set, makes the field only accept values that pass this predicate.

## Related Symbols

(Note that these are not member symbols.)
template<class T>
config_value_adaptor_field< T > | make_config_value_adaptor_field (string_view name, optional< T > default_value=none, bool(*predicate)(const T &)=nullptr)
| Convenience function for creating a config_value_adaptor_field.

## Detailed Description

template<class T>
struct caf::config_value_adaptor_field< T >

Describes a field of type T of an adaptor.

## Friends And Related Symbol Documentation

## make_config_value_adaptor_field()

template<class T>

config_value_adaptor_field< T > make_config_value_adaptor_field | ( | string_view | name,
|  | optional< T > | default_value = none,
|  | bool(* | predicate )(const T &) = nullptr )

related

Convenience function for creating a config_value_adaptor_field.

Parameters

  name | name of the field in configuration files and on the CLI.
  default_value | if set, provides a fallback value if the user does not provide a value.
  predicate | if set, restricts what values the field accepts.

Returns
  a config_value_adaptor_field object, constructed from given arguments.

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

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/config_value_adaptor_field.hpp