Plasma Engine  2.0
Loading...
Searching...
No Matches
PluginConfig.h
1#pragma once
2
3#include <Foundation/Basics.h>
4#include <Foundation/Containers/Set.h>
5#include <Foundation/Reflection/Reflection.h>
6#include <Foundation/Strings/String.h>
7
8class PL_FOUNDATION_DLL plApplicationPluginConfig
9{
10public:
12
13 static constexpr const plStringView s_sConfigFile = ":project/RuntimeConfigs/Plugins.ddl"_plsv;
14
15 plResult Save(plStringView sConfigPath = s_sConfigFile) const;
16 void Load(plStringView sConfigPath = s_sConfigFile);
17 void Apply();
18
19 struct PL_FOUNDATION_DLL PluginConfig
20 {
21 bool operator<(const PluginConfig& rhs) const;
22
23 plString m_sAppDirRelativePath;
24 bool m_bLoadCopy = false;
25 };
26
27 bool AddPlugin(const PluginConfig& cfg);
28 bool RemovePlugin(const PluginConfig& cfg);
29
30 mutable plHybridArray<PluginConfig, 8> m_Plugins;
31};
32
33
35
36PL_DECLARE_REFLECTABLE_TYPE(PL_FOUNDATION_DLL, plApplicationPluginConfig);
37PL_DECLARE_REFLECTABLE_TYPE(PL_FOUNDATION_DLL, plApplicationPluginConfig_PluginConfig);
Definition PluginConfig.h:9
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Definition PluginConfig.h:20
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54