Senzing C++ SDK
C++ SDK for Senzing v4, patterned after the official C# SDK
Loading...
Searching...
No Matches
SzCoreProduct.hpp
Go to the documentation of this file.
1// SzCoreProduct.hpp -- native-backed SzProduct implementation.
2//
3// Ports core/SzCoreProduct.cs. Owned and lifecycle-managed by SzCoreEnvironment;
4// not constructed directly by SDK users (obtain via SzEnvironment::GetProduct).
5#ifndef SENZING_SDK_CORE_SZCOREPRODUCT_HPP
6#define SENZING_SDK_CORE_SZCOREPRODUCT_HPP
7
8#include <mutex>
9#include <string>
10
12
13namespace senzing::sdk::core {
14
15class SzCoreEnvironment;
16
18class SzCoreProduct final : public SzProduct {
19public:
24 ~SzCoreProduct() override = default;
25
26 SzCoreProduct(const SzCoreProduct&) = delete;
28
29 std::string GetLicense() override;
30 std::string GetVersion() override;
31
34 void Destroy();
35
37 [[nodiscard]] bool IsDestroyed();
38
39private:
41 std::mutex monitor_;
42 bool destroyed_{false};
43};
44
45} // namespace senzing::sdk::core
46
47#endif // SENZING_SDK_CORE_SZCOREPRODUCT_HPP
Provides access to the Senzing product version and license metadata.
Definition SzProduct.hpp:10
Core implementation of SzEnvironment backed by the native libSz modules.
Definition SzCoreEnvironment.hpp:29
Core implementation of SzProduct backed by the native SzProduct_* module.
Definition SzCoreProduct.hpp:18
bool IsDestroyed()
True once the native module has been destroyed.
SzCoreProduct(const SzCoreProduct &)=delete
SzCoreProduct(SzCoreEnvironment &env)
Constructs and initializes the native product module using the owning environment's instance name / s...
~SzCoreProduct() override=default
std::string GetLicense() override
Returns the JSON describing the currently installed license.
void Destroy()
Destroys the native product module.
SzCoreProduct & operator=(const SzCoreProduct &)=delete
std::string GetVersion() override
Returns the JSON describing the currently installed product version.
Definition SzCoreConfig.hpp:20