Libmagicxx v9.0.2
A C++ wrapper library over the Magic Number Recognition Library.
|
Classes | |
class | advance_tracker |
RAII helper that advances a shared progress_tracker by a given step count upon destruction. More... | |
class | mark_tracker_as_completed |
RAII helper that marks a shared progress_tracker as completed upon destruction. More... | |
class | percentage |
Represents a value in the range [0, 100]. More... | |
class | progress_tracker |
Thread-safe tracker for monitoring the progress of a job composed of multiple steps. More... | |
Concepts | |
concept | range_container |
Define requirements for a range container. | |
concept | string_converter |
Define requirements for a string converter. | |
concept | file_container |
The file_container concept specifies the requirements of a container which can be used as a file container by the magic class. | |
Typedefs | |
using | shared_progress_tracker_t = std::shared_ptr<progress_tracker> |
Alias for a shared pointer to progress_tracker. | |
Functions | |
shared_progress_tracker_t | make_shared_progress_tracker (std::uint64_t total_steps=1u) noexcept |
Create a shared pointer to a progress_tracker. | |
template<range_container ContainerType, typename StringConverterType > requires string_converter< typename ContainerType::value_type, StringConverterType> | |
std::string | to_string (const ContainerType &container, const std::string &value_separator, StringConverterType string_converter) |
Convert any container to string using the string_converter. | |
std::string | to_string (const file_container auto &container, const std::string &separator=", ") |
Convert the file container to a string. | |
using recognition::utility::shared_progress_tracker_t = std::shared_ptr<progress_tracker> |
Alias for a shared pointer to progress_tracker.
|
inlinenoexcept |
Create a shared pointer to a progress_tracker.
total_steps | Total number of steps (must be >= 1). Defaults to 1. |
|
inlinenodiscard |
Convert any container to string using the string_converter.
ContainerType | The type of the container. |
StringConverterType | The type of the string converter callable. |
[in] | container | |
[in] | value_separator | The separator between the values of the container. |
[in] | string_converter | The callable that converts values of the container to string. |
|
inlinenodiscard |
Convert the file container to a string.
[in] | container | The container that holds the paths of the files. |
[in] | separator | The separator between the paths of the files, default is ", ". |