MLBookProc(3)

MLBookProc(3) Library Functions Manual MLBookProc(3)

NAME

MLBookProc - The MLBookProc class.

SYNOPSIS

#include <MLBookProc.h>

Public Member Functions


MLBookProc (const MLBookProc &)=delete
MLBookProc (MLBookProc &&)=delete
MLBookProc & operator= (const MLBookProc &)=delete
MLBookProc & operator= (MLBookProc &&)=delete
std::string stringToLower (const std::string &str)
std::string getExtension (const std::filesystem::path &p)
std::string getExtension (const std::string &file_name)
std::vector< std::string > getSupportedFileTypes ()
std::vector< std::string > getSupportedArchivesTypesUnpacking ()
std::vector< std::string > getSupportedArchivesTypesPacking ()
bool ifSupportedFile (const std::string &filename)
bool ifSupportedFile (const std::filesystem::path &p)
void libgcryptErrorHandling (const gcry_error_t &err)
template<typename T> T randomNumber ()
std::filesystem::path tempDirPath ()
std::filesystem::path randomFileName ()
std::string timeToDate (const time_t &tt)
std::shared_ptr< DJVUContext > getDJVUContext ()

Static Public Member Functions


static std::shared_ptr< MLBookProc > create ()

Detailed Description

The MLBookProc class.

This class contains various auxiliary methods. It should be created before any other MLBookProc library objects.

Warning

Only one MLBookProc object per application is allowed, otherwise behavior is undefined.

Member Function Documentation

std::shared_ptr< MLBookProc > MLBookProc::create () [static]

Creates MLBookProc object and retunrs smart pointer to it.

Returns

Smart pointer to MLBookProc object.

std::shared_ptr< DJVUContext > MLBookProc::getDJVUContext ()

Creates DJVUContext object.

Returns

Smart pointer to DJVUContext object.

std::string MLBookProc::getExtension (const std::filesystem::path & p)

Returns string, containing file extensinon (looks like .ext).

Parameters

p Path to file, extension of which should be obtained.

Returns

UTF-8 string, containing extension.

std::string MLBookProc::getExtension (const std::string & file_name)

Returns string, containing file extensinon (looks like .ext).

Parameters

file_name Path to file, extension of which should be obtained.

Returns

UTF-8 string, containing extension.

std::vector< std::string > MLBookProc::getSupportedArchivesTypesPacking ()

Returns vector, containing archive formats (UTF-8 strings, looks like zip or tar.gz) for which unpacking is supported.

Returns

Vector of UTF-8 strings.

std::vector< std::string > MLBookProc::getSupportedArchivesTypesUnpacking ()

Returns vector, containing archive formats (UTF-8 strings, looks like zip or tar.gz) for which packing is supported.

Returns

Vector of UTF-8 strings.

std::vector< std::string > MLBookProc::getSupportedFileTypes ()

Returns vector, containing supported file formats (UTF-8 strings, looks like fbd or zip).

Returns

Vector of UTF-8 strings.

bool MLBookProc::ifSupportedFile (const std::filesystem::path & p)

Checks if given file is supported.

Parameters

p Path to file or file name.

Returns

true if file is supported, false otherwise.

bool MLBookProc::ifSupportedFile (const std::string & filename)

Checks if given file is supported.

Parameters

filename Path to file or file name.

Returns

true if file is supported, false otherwise.

void MLBookProc::libgcryptErrorHandling (const gcry_error_t & err)

Auxiliary method for libgcrypt error handling. It throws std::exception in all cases.

Parameters

err libgcrypt error type.

std::filesystem::path MLBookProc::randomFileName ()

Returns random file name.

Returns

Random file name.

template<typename T> T MLBookProc::randomNumber ()

Returns random number. Supported types: int64_t, int32_t, int16_t, int8_t, uint64_t, uint32_t, uint16_t, uint8_t.

Returns

std::string MLBookProc::stringToLower (const std::string & str)

Converts all letters in the string to lowercase letters.

Parameters

str UTF-8 string to be converted.

Returns

UTF-8 lowercase string.

std::filesystem::path MLBookProc::tempDirPath ()

Returns absolute path to system temporary directory.

Returns

Absolute path to system temporary directory.

std::string MLBookProc::timeToDate (const time_t & tt)

Converts time_t object to date string representation (looks like 01.01.2026).

Parameters

tt time_t object to be converted.

Returns

UTF-8 string, containing date.

Author

Generated automatically by Doxygen for MLBookProc from the source code.

Version 2.1 MLBookProc