Data_deduplication_service
Service that will use hashes to deduplicate files
common Namespace Reference

Typedefs

typedef int(FileService::* dirLoad) (std::basic_string_view< char > fromDir, std::basic_string_view< char > toDir)
 
typedef int(FileService::* fileLoad) (std::basic_string_view< char > fromDir, std::basic_string_view< char > toDir, db_services::indexType fileId)
 

Enumerations

enum  logLevel { INFO , WARNING , ERROR , RESULT }
 

Functions

void writeLog (QTextEdit *logTextField, const QString &qLogMessage, logLevel lg)
 
bool isDirName (const QString &path)
 
double smartCeil (double vaL, uint num)
 

Variables

std::unordered_map< int, dirLoaddirs
 
std::unordered_map< int, fileLoadfiles
 

Typedef Documentation

◆ dirLoad

typedef int(FileService::* common::dirLoad) (std::basic_string_view< char > fromDir, std::basic_string_view< char > toDir)

Typedef for load directory

See also
loadDirectory

◆ fileLoad

typedef int(FileService::* common::fileLoad) (std::basic_string_view< char > fromDir, std::basic_string_view< char > toDir, db_services::indexType fileId)

Typedef for load directory

See also
loadFile

Enumeration Type Documentation

◆ logLevel

Log level enum

Enumerator
INFO 
WARNING 
ERROR 
RESULT 

Function Documentation

◆ isDirName()

bool common::isDirName ( const QString &  path)

Check that path is directory path with regex

Parameters
path

◆ smartCeil()

double common::smartCeil ( double  vaL,
uint  num 
)

Returns value rounded up to num symbols after ,

Parameters
vaL
num

◆ writeLog()

void common::writeLog ( QTextEdit *  logTextField,
const QString &  qLogMessage,
logLevel  lg = RESULT 
)

Writes formated log message to logTextField

Parameters
logTextField
qLogMessage
lg

Variable Documentation

◆ dirs

std::unordered_map< int, dirLoad > common::dirs
Initial value:
=
{
{0, &FileService::loadDirectory<file_services::NoCreateMain, file_services::Persist>},
{1, &FileService::loadDirectory<file_services::NoCreateMain, file_services::Remove>},
{2, &FileService::loadDirectory<file_services::CreateMain, file_services::Persist>},
{3, &FileService::loadDirectory<file_services::CreateMain, file_services::Remove>},
}

◆ files

std::unordered_map< int, fileLoad > common::files
Initial value:
=
{
{0, &FileService::loadFile<file_services::NoCreateMain, file_services::Persist>},
{1, &FileService::loadFile<file_services::NoCreateMain, file_services::Remove>},
{2, &FileService::loadFile<file_services::CreateMain, file_services::Persist>},
{3, &FileService::loadFile<file_services::CreateMain, file_services::Remove>},
}