Defines a setting.

Synopsis

Declared in <folly/settings/Settings.h>

#define FOLLY_SETTING_DEFINE(_project, _name, _Type, _def, _mut, _cli, _desc)

Description

Settings are either mutable or immutable where mutable setting values can change at runtime whereas immutable setting values can not be changed after the setting project is frozen (see Immutables.h).

FOLLY_SETTING_DEFINE() can only be placed in a single translation unit and will be checked against accidental collisions.

The setting API can be accessed via FOLLY_SETTING(project, name).<api_func>() and is documented in the Setting class.

All settings for a common namespace; (project, name) must be unique for the whole program. Collisions are verified at runtime on program startup.

Parameters

Name

Description

_project

Project identifier, can only contain [a‐zA‐Z0‐9]

_name

setting name within the project, can only contain []. The string "<project>_<name>" must be unique for the whole program.

_Type

setting value type

_def

default value for the setting

_mut

mutability of the setting

_cli

determines if a setting can be set through the command line

_desc

setting documentation

Created with MrDocs