52 lines
1.2 KiB
C++
52 lines
1.2 KiB
C++
/**
|
||
* @file current_executable.hpp
|
||
* @brief Параметры исполняемого файла
|
||
*/
|
||
|
||
#ifndef MYX_FILESYSTEM_CURRENT_EXECUTABLE_HPP_
|
||
#define MYX_FILESYSTEM_CURRENT_EXECUTABLE_HPP_
|
||
|
||
#pragma once
|
||
|
||
#include <myx/base/config.hpp>
|
||
|
||
#include <QDir>
|
||
#include <QFileInfo>
|
||
#include <QString>
|
||
|
||
|
||
namespace myx {
|
||
|
||
namespace filesystem {
|
||
|
||
class CurrentExecutable
|
||
{
|
||
/// @brief Путь к символической ссылке, указывающей на текущий исполняемый файл
|
||
QFileInfo m_procFilePath;
|
||
|
||
/// @brief Канонический путь к текущему исполняемому файлу
|
||
QFileInfo m_canonicalFilePath;
|
||
|
||
friend class Paths;
|
||
public:
|
||
/**
|
||
* @brief Конструктор, собирающий информацию о текущем исполняемом файле.
|
||
*/
|
||
CurrentExecutable();
|
||
|
||
/**
|
||
* @brief Канонический путь к текущему исполняемому файлу
|
||
*/
|
||
const QFileInfo& canonicalFilePath() const;
|
||
}; // class CurrentExecutable
|
||
|
||
} // namespace filesystem
|
||
|
||
} // namespace myx
|
||
|
||
#ifdef MYXLIB_HEADER_ONLY
|
||
#include "current_executable-inl.hpp"
|
||
#endif
|
||
|
||
#endif // MYX_FILESYSTEM_CURRENT_EXECUTABLE_HPP_
|