|
Libmagicxx v10.0.3
A modern C++23 wrapper for libmagic — the library that powers the Unix file command.
|
Utility components for the libmagicxx library. More...
Classes | |
| class | AdvanceTracker |
| RAII helper that advances a ProgressTracker on destruction. More... | |
| class | MarkTrackerAsCompleted |
| RAII helper that marks a ProgressTracker as completed on destruction. More... | |
| class | Percentage |
| A type-safe percentage value in the range [0, 100]. More... | |
| class | ProgressTracker |
| Thread-safe tracker for monitoring multi-step job progress. More... | |
Concepts | |
| concept | RangeContainer |
| Concept for types that are ranges with an accessible value_type. | |
| concept | StringConverter |
| Concept for callables that convert a value to std::string. | |
| concept | FileContainer |
| Concept for containers that can hold filesystem paths. | |
Typedefs | |
| using | SharedProgressTrackerT = std::shared_ptr<ProgressTracker> |
| Shared pointer type for ProgressTracker. | |
Functions | |
| SharedProgressTrackerT | MakeSharedProgressTracker (std::uint64_t total_steps=1u) noexcept |
| Factory function to create a shared ProgressTracker. | |
| template<RangeContainer ContainerT, typename StringConverterT> requires StringConverter<typename ContainerT::value_type, StringConverterT> | |
| std::string | ToString (const ContainerT &container, const std::string &value_separator, StringConverterT string_converter) |
| Convert a container to a string using a custom converter. | |
| std::string | ToString (const FileContainer auto &container, const std::string &separator=", ") |
| Convert a FileContainer to a string. | |
Utility components for the libmagicxx library.
The Utility namespace provides supporting types, concepts, and functions used throughout the libmagicxx library. These utilities are also available for use by consumers of the library.
| Component | Description |
|---|---|
| Concepts | RangeContainer, StringConverter, FileContainer |
| Classes | Percentage, ProgressTracker |
| Functions | ToString(), MakeSharedProgressTracker() |
| RAII Helpers | MarkTrackerAsCompleted, AdvanceTracker |