Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
Senzing C++ SDK

A C++ SDK for Senzing v4, patterned 1:1 after the official C# SDK. Type names, method names, flag/constant names, and the exception hierarchy match the C# SDK character-for-character (PascalCase); the underlying types are the natural C++ equivalents (std::string, int64_t, std::optional, STL containers).

Two-layer design

Namespace Role
senzing::sdk Abstract interfaces, flags, exception types, constants — no implementation.
senzing::sdk::core Native-backed implementation that calls the Senzing native library (libSz).

Consumers program against the senzing::sdk abstractions; only senzing::sdk::core touches the native library.

Core types

Getting started

The environment is constructed via a fluent builder and torn down with Destroy():

using namespace senzing::sdk;
auto env = core::SzCoreEnvironment::NewBuilder()
.InstanceName("my-app")
.Settings(settings) // SENZING_ENGINE_CONFIGURATION_JSON
.VerboseLogging(false)
.Build();
SzEngine& engine = env->GetEngine();
std::string info = engine.AddRecord("CUSTOMERS", "1001", recordJson);
env->Destroy();
The core Senzing entity-resolution engine.
Definition SzEngine.hpp:28
virtual std::string AddRecord(const std::string &dataSourceCode, const std::string &recordID, const std::string &recordDefinition, SzFlags flags=SzAddRecordDefaultFlags)=0
Definition SzCoreConfig.hpp:20

See the examples/ directory for runnable, per-subsystem programs.

Exceptions

All engine errors derive from SzException. SzEnvironmentDestroyedException is deliberately outside that tree (it extends std::logic_error), signalling misuse of an environment after Destroy() rather than an engine error.