[#FOLLY_SETTING_DEFINE]
= FOLLY&lowbar;SETTING&lowbar;DEFINE
:mrdocs:

Defines a setting&period;

== Synopsis

Declared in `&lt;folly&sol;settings&sol;Settings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define FOLLY&lowbar;SETTING&lowbar;DEFINE(&lowbar;project, &lowbar;name, &lowbar;Type, &lowbar;def, &lowbar;mut, &lowbar;cli, &lowbar;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&period;h)&period;

FOLLY&lowbar;SETTING&lowbar;DEFINE() can only be placed in a single translation unit and will be checked against accidental collisions&period;

The setting API can be accessed via FOLLY&lowbar;SETTING(project, name)&period;&lt;api&lowbar;func&gt;() and is documented in the Setting class&period;

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *&lowbar;project*
| Project identifier, can only contain &lsqb;a&hyphen;zA&hyphen;Z0&hyphen;9&rsqb;
| *&lowbar;name*
| setting name within the project, can only contain &lsqb;&rsqb;&period; The string &quot;&lt;project&gt;&lowbar;&lt;name&gt;&quot; must be unique for the whole program&period;
| *&lowbar;Type*
| setting value type
| *&lowbar;def*
| default value for the setting
| *&lowbar;mut*
| mutability of the setting
| *&lowbar;cli*
| determines if a setting can be set through the command line
| *&lowbar;desc*
| setting documentation
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
