51 lines
1.0 KiB
C++
51 lines
1.0 KiB
C++
/**
|
|
* @file paths.hpp
|
|
* @brief Стандартные пути к каталогам и файлам
|
|
*/
|
|
|
|
#ifndef MYX_FILESYSTEM_PATHS_MT_HPP_
|
|
#define MYX_FILESYSTEM_PATHS_MT_HPP_
|
|
|
|
#pragma once
|
|
|
|
#include <myx/filesystem/current_executable.hpp>
|
|
#include <myx/filesystem/paths.hpp>
|
|
|
|
#include <QDir>
|
|
#include <QFileInfo>
|
|
#include <QString>
|
|
|
|
#include <atomic>
|
|
#include <future>
|
|
#include <mutex>
|
|
#include <thread>
|
|
|
|
namespace myx {
|
|
|
|
namespace filesystem {
|
|
|
|
/// @brief Потокобезопасная версия класса myx::filesystem::Paths
|
|
class PathsMT : public Paths
|
|
{
|
|
PathsMT();
|
|
~PathsMT() = default;
|
|
PathsMT( const PathsMT& ) = delete; // NOLINT
|
|
PathsMT& operator=( const PathsMT& ) = delete; // NOLINT
|
|
|
|
static std::atomic< PathsMT* > mInstance;
|
|
static std::mutex mMutex;
|
|
|
|
public:
|
|
/**
|
|
* @brief getInstance
|
|
* @return Уникальный экземпляр класса PathsMT
|
|
*/
|
|
static PathsMT& instance();
|
|
}; // class PathsMT
|
|
|
|
} // namespace filesystem
|
|
|
|
} // namespace myx
|
|
|
|
#endif // MYX_FILESYSTEM_PATHS_MT_HPP_
|