8#ifndef SENZING_SDK_CORE_SZCORECONFIGMANAGER_HPP
9#define SENZING_SDK_CORE_SZCORECONFIGMANAGER_HPP
20class SzCoreEnvironment;
37 const std::string& configDefinition)
override;
40 const std::string& configComment)
override;
45 int64_t newDefaultConfigID)
override;
48 const std::string& configComment)
override;
61 void EnsureConfigMgrInitialized();
65 bool configInitialized_{
false};
66 bool configMgrInitialized_{
false};
67 bool destroyed_{
false};
Manages persisted Senzing configurations and the default config registry.
Definition SzConfigManager.hpp:18
Core implementation of SzConfigManager backed by the native SzConfig_* and SzConfigMgr_* modules.
Definition SzCoreConfigManager.hpp:24
SzCoreConfigManager(const SzCoreConfigManager &)=delete
int64_t GetDefaultConfigID() override
Returns the current default configuration ID.
SzCoreConfigManager & operator=(const SzCoreConfigManager &)=delete
void ReplaceDefaultConfigID(int64_t currentDefaultConfigID, int64_t newDefaultConfigID) override
Atomically replaces the default config ID if it currently matches currentDefaultConfigID.
std::unique_ptr< SzConfig > CreateConfig(const std::string &configDefinition) override
Creates an in-memory config from the supplied JSON definition.
int64_t RegisterConfig(const std::string &configDefinition) override
Registers a config definition (auto-generated comment); returns the ID.
std::unique_ptr< SzConfig > CreateConfig() override
Creates a new in-memory config from the registered template.
int64_t RegisterConfig(const std::string &configDefinition, const std::string &configComment) override
Registers a config definition with a comment; returns the new config ID.
~SzCoreConfigManager() override=default
std::unique_ptr< SzConfig > CreateConfig(int64_t configID) override
Loads the persisted config with the given ID into a new in-memory config.
void Destroy()
Destroys both native modules.
int64_t SetDefaultConfig(const std::string &configDefinition, const std::string &configComment) override
Registers configDefinition (with comment) and sets it as default; returns the new config ID.
bool IsDestroyed()
True once the native SzConfig_* module has been destroyed.
std::string GetConfigRegistry() override
Returns JSON describing all registered configurations.
void SetDefaultConfigID(int64_t configID) override
Sets the default configuration ID.
int64_t SetDefaultConfig(const std::string &configDefinition) override
Registers configDefinition (auto comment) and sets it as default.
SzCoreConfigManager(SzCoreEnvironment &env)
Constructs and initializes the native SzConfig_* module using the owning environment's settings.
Core implementation of SzEnvironment backed by the native libSz modules.
Definition SzCoreEnvironment.hpp:29
Definition SzCoreConfig.hpp:20