Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
senzing::sdk::SzEnvironment Class Referenceabstract

Factory + lifecycle for the Senzing SDK subsystems. More...

#include <SzEnvironment.hpp>

Inheritance diagram for senzing::sdk::SzEnvironment:

Public Member Functions

virtual ~SzEnvironment ()=default
virtual SzProduct & GetProduct ()=0
 Returns the env-owned SzProduct (lazily created).
virtual SzEngine & GetEngine ()=0
 Returns the env-owned SzEngine (lazily created).
virtual SzConfigManager & GetConfigManager ()=0
 Returns the env-owned SzConfigManager (lazily created).
virtual SzDiagnostic & GetDiagnostic ()=0
 Returns the env-owned SzDiagnostic (lazily created).
virtual int64_t GetActiveConfigID ()=0
 Returns the currently active configuration ID.
virtual void Reinitialize (int64_t configID)=0
 Reinitializes the engine/diagnostic with the given configuration ID.
virtual void Destroy ()=0
 Destroys the environment and all owned subsystems. Idempotent.
virtual bool IsDestroyed ()=0
 Returns true once Destroy() has been initiated/completed.
virtual SzLogging & GetLogging ()=0
 Returns the logging interface: native libSzLogging callbacks, levels, formats and the default output.

Detailed Description

Factory + lifecycle for the Senzing SDK subsystems.

Constructor & Destructor Documentation

◆ ~SzEnvironment()

virtual senzing::sdk::SzEnvironment::~SzEnvironment ( )
virtualdefault

Member Function Documentation

◆ Destroy()

virtual void senzing::sdk::SzEnvironment::Destroy ( )
pure virtual

Destroys the environment and all owned subsystems. Idempotent.

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ GetActiveConfigID()

virtual int64_t senzing::sdk::SzEnvironment::GetActiveConfigID ( )
pure virtual

Returns the currently active configuration ID.

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ GetConfigManager()

virtual SzConfigManager & senzing::sdk::SzEnvironment::GetConfigManager ( )
pure virtual

Returns the env-owned SzConfigManager (lazily created).

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ GetDiagnostic()

virtual SzDiagnostic & senzing::sdk::SzEnvironment::GetDiagnostic ( )
pure virtual

Returns the env-owned SzDiagnostic (lazily created).

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ GetEngine()

virtual SzEngine & senzing::sdk::SzEnvironment::GetEngine ( )
pure virtual

Returns the env-owned SzEngine (lazily created).

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ GetLogging()

virtual SzLogging & senzing::sdk::SzEnvironment::GetLogging ( )
pure virtual

Returns the logging interface: native libSzLogging callbacks, levels, formats and the default output.

(Leads the C# SDK, which has no SzLogging yet; see SzLogging.hpp.)

Logging is process-global native state, so every SzLogging obtained here controls the same native logger. This call performs no native initialization, so callbacks can be registered BEFORE the first GetEngine() (or any other subsystem): that captures initialization messages, and on Senzing 4.5.0 it is required by the usage rule. Registrations outlive Destroy() and Reinitialize().

Unlike the other accessors it never throws and also works AFTER Destroy(), which is when the 4.5.0 usage rule allows changing registrations and the default output. The reference is valid for the life of the process.

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ GetProduct()

virtual SzProduct & senzing::sdk::SzEnvironment::GetProduct ( )
pure virtual

Returns the env-owned SzProduct (lazily created).

Reference valid until Destroy(). Throws SzEnvironmentDestroyedException after Destroy().

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ IsDestroyed()

virtual bool senzing::sdk::SzEnvironment::IsDestroyed ( )
pure virtual

Returns true once Destroy() has been initiated/completed.

Implemented in senzing::sdk::core::SzCoreEnvironment.

◆ Reinitialize()

virtual void senzing::sdk::SzEnvironment::Reinitialize ( int64_t configID)
pure virtual

Reinitializes the engine/diagnostic with the given configuration ID.

Implemented in senzing::sdk::core::SzCoreEnvironment.


The documentation for this class was generated from the following file: