MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / _get_config

Function _get_config

src/Configuration.cpp:128–133  ·  view source on GitHub ↗

A helper function to ensure that configuration is not accessed before it is initialized (was formerly static)

Source from the content-addressed store, hash-verified

126std::unique_ptr<Configuration> pconfig;
127/// A helper function to ensure that configuration is not accessed before it is initialized (was formerly static)
128Configuration* _get_config() {
129 if (!pconfig) {
130 pconfig = std::make_unique<Configuration>();
131 }
132 return pconfig.get();
133}
134
135void set_config_bool(configuration_keys key, bool val) {
136 _get_config()->get_item(key).set_bool(val);

Callers 10

set_config_boolFunction · 0.85
set_config_intFunction · 0.85
set_config_doubleFunction · 0.85
set_config_stringFunction · 0.85
get_config_boolFunction · 0.85
get_config_intFunction · 0.85
get_config_doubleFunction · 0.85
get_config_stringFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected