MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / MountablePath

Class MountablePath

include/Core/System/MountablePath.hpp:31–88  ·  view source on GitHub ↗

* \brief Class used to encapsulate mounted Paths */

Source from the content-addressed store, hash-verified

29 * \brief Class used to encapsulate mounted Paths
30 */
31 class MountablePath
32 {
33 private:
34 static std::vector<MountablePath> MountedPaths;
35
36 public:
37 /**
38 * \brief Constructor of MountablePath
39 * \param pathType Type of the mounted path
40 * \param basePath Path to the mounted path
41 * \param priority Priority of the mounted path
42 */
43 MountablePath(MountablePathType pathType, const std::string& basePath,
44 unsigned int priority = 0);
45 /**
46 * \brief Type of the mounted path
47 */
48 MountablePathType pathType;
49 /**
50 * \brief Path of the mounted path
51 */
52 std::string basePath;
53 /**
54 * \brief Priority of the mounted path (Higher priority means overriding
55 * lower priority Paths)
56 */
57 unsigned int priority;
58
59 bool operator==(const MountablePath& other) const;
60
61 public:
62 /**
63 * \brief Function called to Mount all Paths using 'Mount.vili' file
64 */
65 static void LoadMountFile();
66 /**
67 * \brief Add a Path to Mounted Paths
68 * \param path Path to mount
69 */
70 static void Mount(MountablePath path);
71 /**
72 * \brief Remove a Path from Mounted Paths
73 * \param path Path to unmount
74 */
75 static void Unmount(MountablePath path);
76 /**
77 * \brief All the Mounted Paths
78 */
79 static const std::vector<MountablePath>& Paths();
80 /**
81 * \brief All the Mounted Paths as strings
82 */
83 static std::vector<std::string> StringPaths();
84 /**
85 * \brief Sort the mounted paths based on their priorities
86 */
87 static void Sort();
88 };

Callers 3

LoadFunction · 0.85
LoadMountFileMethod · 0.85
LoadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected