![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Thread-safe singleton registry of compression codec implementations. More...
#include <codec.hpp>
Public Member Functions | |
| void | register_codec (std::unique_ptr< CompressionCodec > codec) |
| Register a codec, transferring ownership to the registry. | |
| const CompressionCodec * | get (Compression type) const |
| Look up a registered codec by its Compression type. | |
| bool | has (Compression type) const |
| Check whether a codec is available for the given compression type. | |
| std::vector< Compression > | available () const |
| List all available compression types, including UNCOMPRESSED. | |
Deleted copy/move operations (singleton) | |
| CodecRegistry (const CodecRegistry &)=delete | |
| CodecRegistry & | operator= (const CodecRegistry &)=delete |
| CodecRegistry (CodecRegistry &&)=delete | |
| CodecRegistry & | operator= (CodecRegistry &&)=delete |
Static Public Member Functions | |
| static CodecRegistry & | instance () |
| Access the process-wide singleton instance. | |
Thread-safe singleton registry of compression codec implementations.
Codecs can be registered from static initializers or at runtime from any thread. All look-up and mutation operations are guarded by an internal mutex. UNCOMPRESSED is handled inline by the convenience functions and is never stored in the registry itself.
|
delete |
|
delete |
|
inline |
List all available compression types, including UNCOMPRESSED.
|
inline |
Look up a registered codec by its Compression type.
| type | The Compression enumerator to look up. |
nullptr if not registered.
|
inline |
|
inlinestatic |
Access the process-wide singleton instance.
|
delete |
|
delete |
|
inline |
Register a codec, transferring ownership to the registry.
If a codec for the same Compression type is already registered, the previous one is replaced and destroyed.
| codec | Owning pointer to the codec implementation. Null pointers are silently ignored. |