Plasma Engine  2.0
Loading...
Searching...
No Matches
Plugins.h
1#pragma once
2
3#include <EditorFramework/EditorFrameworkDLL.h>
4#include <Foundation/Containers/Map.h>
5#include <Foundation/Strings/String.h>
6#include <Foundation/Time/Timestamp.h>
7
10
16struct PL_EDITORFRAMEWORK_DLL plPluginBundle
17{
18 // State: user selectable per project
19 bool m_bSelected = false;
20 bool m_bLoadCopy = false;
21
22 // Temp state:
23 bool m_bMissing = false;
24 plTimestamp m_LastModificationTime;
25
26 // General Bundle Description
27 bool m_bMandatory = false;
39
41 plResult ReadBundleFromDDL(plOpenDdlReader& ref_ddl);
42
44 void WriteStateToDDL(plOpenDdlWriter& ref_ddl, const char* szOwnName) const;
45
47 void ReadStateFromDDL(plOpenDdlReader& ref_ddl, const char* szOwnName);
48
50 bool IsStateEqual(const plPluginBundle& rhs) const
51 {
52 return m_bSelected == rhs.m_bSelected && m_bLoadCopy == rhs.m_bLoadCopy;
53 }
54};
55
57struct PL_EDITORFRAMEWORK_DLL plPluginBundleSet
58{
60
62 void WriteStateToDDL(plOpenDdlWriter& ref_ddl) const;
63
65 void ReadStateFromDDL(plOpenDdlReader& ref_ddl);
66
68 bool IsStateEqual(const plPluginBundleSet& rhs) const;
69};
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition Map.h:408
An OpenDDL reader parses an entire DDL document and creates an in-memory representation of the docume...
Definition OpenDdlReader.h:118
The base class for OpenDDL writers.
Definition OpenDdlWriter.h:13
The timestamp class encapsulates a date in time as microseconds since Unix epoch.
Definition Timestamp.h:23
A plugin bundle lists all the files and information needed to get one feature plugin working both in ...
Definition Plugins.h:17
plString m_sIconName
The name of the icon for the plugin.
Definition Plugins.h:29
plHybridArray< plString, 1 > m_EditorEnginePlugins
List of all the DLLs to load into the editor's engine process.
Definition Plugins.h:33
plHybridArray< plString, 1 > m_EditorPlugins
List of all the DLLs (without extension) to load into the editor process.
Definition Plugins.h:32
plString m_sDisplayName
The string for displaying the bundle in UI.
Definition Plugins.h:28
plHybridArray< plString, 1 > m_ExclusiveFeatures
If two bundles have the same string in this list, they can't be activated at the same time....
Definition Plugins.h:37
plHybridArray< plString, 1 > m_RuntimePlugins
List of all the DLLs to load into the runtime. These will also get packaged.
Definition Plugins.h:34
bool IsStateEqual(const plPluginBundle &rhs) const
Checks whether two bundles have the same state.
Definition Plugins.h:50
plHybridArray< plString, 1 > m_PackageDependencies
Additional files to include in packages. E.g. indirect DLL dependencies.
Definition Plugins.h:35
plString m_sDescription
A proper description what this bundle is for, so that users know when to use it.
Definition Plugins.h:31
plString m_sBannerName
The name of the banner image used above the description.
Definition Plugins.h:30
plHybridArray< plString, 1 > m_RequiredBundles
The file names (without path or extension) of other bundles that are required for this bundle to work...
Definition Plugins.h:36
plHybridArray< plString, 1 > m_EnabledInTemplates
In which project templates this plugin should be active by default.
Definition Plugins.h:38
bool m_bLoadCopy
Whether the engine should load a copy of the runtime DLL, so that the original can be replaced and po...
Definition Plugins.h:20
bool m_bSelected
whether this bundle is supposed to be used.
Definition Plugins.h:19
Contains multiple plPluginBundle's.
Definition Plugins.h:58
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54