MeshLib Documentation
Loading...
Searching...
No Matches
MR::SystemPath Class Reference

system directory path manager More...

#include <MRSystemPath.h>

Public Types

enum class  Directory {
  Resources , Fonts , Plugins , PythonModules ,
  Count
}
 directory category More...
 
enum class  SystemFontType {
  Regular , Bold , Italic , BoldItalic ,
  Count
}
 
using SystemFontPaths = std::array<std::filesystem::path, size_t( SystemFontType::Count )>
 

Static Public Member Functions

static MRMESH_API Expected< std::filesystem::path > getExecutablePath ()
 get the current executable's file path
 
static MRMESH_API Expected< std::filesystem::path > getLibraryPath ()
 get the MRMesh binary's file path
 
static MRMESH_API Expected< std::filesystem::path > getExecutableDirectory ()
 get the current executable's directory path
 
static MRMESH_API Expected< std::filesystem::path > getLibraryDirectory ()
 get the MRMesh binary's directory path
 
static MRMESH_API std::filesystem::path getDirectory (Directory dir)
 get the directory path for specified category
 
static MRMESH_API void overrideDirectory (Directory dir, const std::filesystem::path &path)
 override the directory path for specified category, useful for custom configurations
 
static std::filesystem::path getResourcesDirectory ()
 get the resource files' directory path
 
static std::filesystem::path getFontsDirectory ()
 get the font files' directory path
 
static std::filesystem::path getPluginsDirectory ()
 get the plugin binaries' directory path
 
static std::filesystem::path getPythonModulesDirectory ()
 get the Python modules' binaries' directory path
 
static MRMESH_API const std::vector< SystemFontPaths > & getSystemFonts ()
 get name all system fonts that have italics, bold, bold italics
 

Detailed Description

system directory path manager

Member Typedef Documentation

◆ SystemFontPaths

using MR::SystemPath::SystemFontPaths = std::array<std::filesystem::path, size_t( SystemFontType::Count )>

Member Enumeration Documentation

◆ Directory

enum class MR::SystemPath::Directory
strong

directory category

Enumerator
Resources 

resources (.json, .png)

Fonts 

fonts (.ttf, .otf)

Plugins 

plugins (.dll, .so, .dylib)

PythonModules 

Python modules (.pyd, .so, .dylib, .pyi)

Count 

◆ SystemFontType

enum class MR::SystemPath::SystemFontType
strong
Enumerator
Regular 
Bold 
Italic 
BoldItalic 
Count 

Member Function Documentation

◆ getDirectory()

static MRMESH_API std::filesystem::path MR::SystemPath::getDirectory ( Directory dir)
static

get the directory path for specified category

◆ getExecutableDirectory()

static MRMESH_API Expected< std::filesystem::path > MR::SystemPath::getExecutableDirectory ( )
static

get the current executable's directory path

◆ getExecutablePath()

static MRMESH_API Expected< std::filesystem::path > MR::SystemPath::getExecutablePath ( )
static

get the current executable's file path

◆ getFontsDirectory()

static std::filesystem::path MR::SystemPath::getFontsDirectory ( )
inlinestatic

get the font files' directory path

◆ getLibraryDirectory()

static MRMESH_API Expected< std::filesystem::path > MR::SystemPath::getLibraryDirectory ( )
static

get the MRMesh binary's directory path

◆ getLibraryPath()

static MRMESH_API Expected< std::filesystem::path > MR::SystemPath::getLibraryPath ( )
static

get the MRMesh binary's file path

◆ getPluginsDirectory()

static std::filesystem::path MR::SystemPath::getPluginsDirectory ( )
inlinestatic

get the plugin binaries' directory path

◆ getPythonModulesDirectory()

static std::filesystem::path MR::SystemPath::getPythonModulesDirectory ( )
inlinestatic

get the Python modules' binaries' directory path

◆ getResourcesDirectory()

static std::filesystem::path MR::SystemPath::getResourcesDirectory ( )
inlinestatic

get the resource files' directory path

◆ getSystemFonts()

static MRMESH_API const std::vector< SystemFontPaths > & MR::SystemPath::getSystemFonts ( )
static

get name all system fonts that have italics, bold, bold italics

◆ overrideDirectory()

static MRMESH_API void MR::SystemPath::overrideDirectory ( Directory dir,
const std::filesystem::path & path )
static

override the directory path for specified category, useful for custom configurations


The documentation for this class was generated from the following file: