FOLLY_SETTING_DEFINE

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

NameDescription
_projectProject identifier, can only contain [a-zA-Z0-9]
_namesetting name within the project, can only contain []. The string "<project>_<name>" must be unique for the whole program.
_Typesetting value type
_defdefault value for the setting
_mutmutability of the setting
_clidetermines if a setting can be set through the command line
_descsetting documentation