This class is a proxy for working with folly::settings represented as strings. It can apply changes to these folly::settings via snapshot provided by user. Changes are not going to be published by this class, it is callers resposibility to commit/publish cahnges from snapshot into global state.
Synopsis
Declared in <folly/settings/SettingsAccessorProxy.h>
class SettingsAccessorProxy
: public ISettingsAccessorProxy
Description
This class is mainly useful when one needs to parse folly::settings from command line or a config file.
If default project and/or aliases map are provided SettingsAccessorProxy will try to expand flag name into fully qualified folly::setting name.
Base Classes
Name |
Description |
Interface for applying string‐based setting changes to a snapshot. |
Type Aliases
Name |
Description |
Maps an alias name to the fully qualified setting name it refers to. |
|
Maps a fully qualified setting name to its static metadata. |
Member Functions
Name |
Description |
|
Constructs a proxy that applies setting changes to the given snapshot. |
|
Destroys the proxy. |
Returns the metadata for a single flag, if it is a registered setting. |
|
|
|
Returns true if flag is registered folly::setting. Flag alias and name expantion works the same as toFullyQualifiedName(). |
|
Returns true if flag is registered as bool folly::setting. Flag alias and name expantion works the same as toFullyQualifiedName(). If flag is not folly::settings, returns false. |
|
|
Resets flag to default value. |
|
Sets value of settingName into newValue with reason set to |
Returns the snapshot associated with this proxy. |
|
Return full name of folly::setting if flag is registered as folly::setting. This method will resolve flag aliases and prepend flag with default project, if any of this applies. |
Protected Member Functions
Name |
Description |
|
Looks up the metadata entry for a fully qualified setting name. |
Protected Data Members
Name |
Description |
Reverse map of alternative names for settings. |
|
Default project name used to expand unqualified flag names. |
|
Map from fully qualified setting name to its metadata. |
Created with MrDocs