|
Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
|
Namespaces | |
| namespace | core |
| namespace | detail |
Classes | |
| class | SzConfig |
| In-memory Senzing configuration document. More... | |
| class | SzConfigManager |
| Manages persisted Senzing configurations and the default config registry. More... | |
| class | SzDiagnostic |
| Diagnostic operations against the Senzing repository. More... | |
| class | SzEngine |
| The core Senzing entity-resolution engine. More... | |
| class | SzEnvironment |
| Factory + lifecycle for the Senzing SDK subsystems. More... | |
| class | SzException |
| Base exception for all Senzing engine errors. More... | |
| class | SzEnvironmentDestroyedException |
| Thrown when an SzEnvironment (or a subsystem it owns) is used after Destroy(). More... | |
| class | SzLogOutput |
| Destination of native's default output. More... | |
| class | SzLogCallbackOptions |
| Registration parameters: the callback's minimum level and the format native applies to SzLogRecord::Message(). More... | |
| struct | SzLogEntry |
| An owned copy of an SzLogRecord, for queues and buffers. More... | |
| class | SzLogRecord |
| One log message, borrowed from native for the duration of a callback. More... | |
| class | SzLogRegistration |
| A live native callback registration, owned through std::unique_ptr (so it is move-only). More... | |
| class | SzLogCapture |
| Collects the records logged on the thread that created it until Finish(). More... | |
| class | SzLogging |
| Senzing native logging (libSzLogging). More... | |
| class | SzProduct |
| Provides access to the Senzing product version and license metadata. More... | |
Typedefs | |
| using | SzExportHandle = std::uintptr_t |
| Opaque export-report handle, mirroring the C# IntPtr. | |
| using | SzLogCallback = std::function<void(const SzLogRecord&)> |
| A log callback. | |
Enumerations | |
| enum class | SzLogLevel : int32_t { Trace = 0 , Debug = 1 , Info = 2 , Warn = 3 , Error = 4 , Critical = 5 , Off = 6 } |
| Log severity. More... | |
| enum class | SzLogFormat : int32_t { Legacy = 0 , Jsonl = 1 , Bare = 2 , Default = 3 } |
| Message format, applied by native (SZ_LOG_FORMAT_*). More... | |
| enum class | SzLogOutputType : int32_t { Stderr = 0 , Stdout = 1 , File = 2 , Null = 3 , Callback = 4 } |
| The kind of destination of native's default output (SZ_LOG_OUTPUT_*). More... | |
Functions | |
| SENZING_SDK_DECLARE_EXCEPTION (SzBadInputException, SzException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzConfigurationException, SzException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzReplaceConflictException, SzException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzRetryableException, SzException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzUnrecoverableException, SzException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzNotFoundException, SzBadInputException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzUnknownDataSourceException, SzBadInputException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzDatabaseConnectionLostException, SzRetryableException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzDatabaseTransientException, SzRetryableException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzRetryTimeoutExceededException, SzRetryableException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzDatabaseException, SzUnrecoverableException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzLicenseException, SzUnrecoverableException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzNotInitializedException, SzUnrecoverableException) | |
| SENZING_SDK_DECLARE_EXCEPTION (SzUnhandledException, SzUnrecoverableException) | |
| constexpr std::string_view | ToString (SzLogLevel level) noexcept |
| The canonical upper-case name: "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL" or "OFF" ("UNKNOWN" for a value outside the enum). | |
| constexpr std::string_view | ToString (SzLogFormat format) noexcept |
| The canonical upper-case name: "LEGACY", "JSONL", "BARE" or "DEFAULT" ("UNKNOWN" for a value outside the enum). | |
| std::ostream & | operator<< (std::ostream &os, SzLogLevel level) |
| Writes ToString(level). | |
| std::ostream & | operator<< (std::ostream &os, SzLogFormat format) |
| Writes ToString(format). | |
| SzLogLevel | ParseSzLogLevel (std::string_view text) |
| Parses a level name. | |
| SzLogFormat | ParseSzLogFormat (std::string_view text) |
| Parses a format name. | |
| std::ostream & | operator<< (std::ostream &os, const SzLogEntry &entry) |
| Writes entry.Message (the message as native formatted it). | |
| std::ostream & | operator<< (std::ostream &os, const SzLogRecord &record) |
| Writes record.Message() (the message as native formatted it). | |
Variables | |
| constexpr std::array< SzLogLevel, 7 > | SzLogLevels |
| All levels, most verbose first. | |
| constexpr std::array< SzLogFormat, 4 > | SzLogFormats |
| All formats. | |
| using senzing::sdk::SzExportHandle = std::uintptr_t |
Opaque export-report handle, mirroring the C# IntPtr.
The raw native handle is exposed deliberately (no RAII wrapper) so the surface matches C#; callers must pass it to CloseExportReport.
| using senzing::sdk::SzLogCallback = std::function<void(const SzLogRecord&)> |
A log callback.
Accepts any callable (lambda, function, functor). It may be invoked concurrently from several threads; exceptions it throws are caught and discarded at the native boundary.
|
strong |
Message format, applied by native (SZ_LOG_FORMAT_*).
|
strong |
Log severity.
The values are the native SZ_LOG_LEVEL_* values, ordered from most to least verbose, so level >= SzLogLevel::Warn reads naturally.
Native writes its own spellings, which differ from ToString(): JSONL severity is lower case (warning for Warn) and the Legacy tag is abbreviated (TRCE, DBUG, INFO, WARN, ERR, CRIT). ParseSzLogLevel() accepts warning.
|
strong |
The kind of destination of native's default output (SZ_LOG_OUTPUT_*).
| Enumerator | |
|---|---|
| Stderr | Standard error (the native default). |
| Stdout | Standard output. |
| File | A file opened by native (truncate or append). |
| Null | Discard; only registered callbacks receive messages. |
| Callback | A default callback is set. Reported by SzLogging::GetDefaultOutput only; install one with SzLogging::SetDefaultCallback. |
|
inline |
Writes entry.Message (the message as native formatted it).
|
inline |
Writes record.Message() (the message as native formatted it).
|
inline |
Writes ToString(format).
|
inline |
Writes ToString(level).
|
inlinenodiscard |
Parses a format name.
Case-insensitive; surrounding whitespace is ignored and "json" is accepted for Jsonl. Throws SzBadInputException when the text names no format.
|
inlinenodiscard |
Parses a level name.
Case-insensitive; surrounding whitespace is ignored and "warning" is accepted for Warn. Throws SzBadInputException when the text names no level.
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzBadInputException | , |
| SzException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzConfigurationException | , |
| SzException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzDatabaseConnectionLostException | , |
| SzRetryableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzDatabaseException | , |
| SzUnrecoverableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzDatabaseTransientException | , |
| SzRetryableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzLicenseException | , |
| SzUnrecoverableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzNotFoundException | , |
| SzBadInputException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzNotInitializedException | , |
| SzUnrecoverableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzReplaceConflictException | , |
| SzException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzRetryableException | , |
| SzException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzRetryTimeoutExceededException | , |
| SzRetryableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzUnhandledException | , |
| SzUnrecoverableException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzUnknownDataSourceException | , |
| SzBadInputException | ) |
| senzing::sdk::SENZING_SDK_DECLARE_EXCEPTION | ( | SzUnrecoverableException | , |
| SzException | ) |
|
nodiscardconstexprnoexcept |
The canonical upper-case name: "LEGACY", "JSONL", "BARE" or "DEFAULT" ("UNKNOWN" for a value outside the enum).
|
nodiscardconstexprnoexcept |
The canonical upper-case name: "TRACE", "DEBUG", "INFO", "WARN", "ERROR", "CRITICAL" or "OFF" ("UNKNOWN" for a value outside the enum).
|
inlineconstexpr |
All formats.
|
inlineconstexpr |
All levels, most verbose first.