|
MLBookProc 2.1
|
The MLBookProc class. More...
#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 () |
The MLBookProc class.
This class contains various auxiliary methods. It should be created before any other MLBookProc library objects.
|
static |
Creates MLBookProc object and retunrs smart pointer to it.
| std::shared_ptr< DJVUContext > MLBookProc::getDJVUContext | ( | ) |
Creates DJVUContext object.
| std::string MLBookProc::getExtension | ( | const std::filesystem::path & | p | ) |
Returns string, containing file extensinon (looks like .ext).
| p | Path to file, extension of which should be obtained. |
| std::string MLBookProc::getExtension | ( | const std::string & | file_name | ) |
Returns string, containing file extensinon (looks like .ext).
| file_name | Path to file, extension of which should be obtained. |
| 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.
| 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.
| std::vector< std::string > MLBookProc::getSupportedFileTypes | ( | ) |
Returns vector, containing supported file formats (UTF-8 strings, looks like fbd or zip).
| bool MLBookProc::ifSupportedFile | ( | const std::filesystem::path & | p | ) |
Checks if given file is supported.
| p | Path to file or file name. |
| bool MLBookProc::ifSupportedFile | ( | const std::string & | filename | ) |
Checks if given file is supported.
| filename | Path to file or file name. |
| void MLBookProc::libgcryptErrorHandling | ( | const gcry_error_t & | err | ) |
| std::filesystem::path MLBookProc::randomFileName | ( | ) |
Returns random file name.
| T MLBookProc::randomNumber | ( | ) |
Returns random number. Supported types: int64_t, int32_t, int16_t, int8_t, uint64_t, uint32_t, uint16_t, uint8_t.
| std::string MLBookProc::stringToLower | ( | const std::string & | str | ) |
Converts all letters in the string to lowercase letters.
| str | UTF-8 string to be converted. |
| std::filesystem::path MLBookProc::tempDirPath | ( | ) |
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).
| tt | time_t object to be converted. |