MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
mostlyharmless_IPluginEntry.h
Go to the documentation of this file.
1//
2// Created by Syl Morrison on 20/10/2024.
3//
4
5#ifndef MOSTLYHARMLESS_MOSTLYHARMLESS_IPLUGINENTRY_H
6#define MOSTLYHARMLESS_MOSTLYHARMLESS_IPLUGINENTRY_H
10
11namespace mostly_harmless::core {
20 struct IPluginEntry {
24 virtual ~IPluginEntry() noexcept = default;
25
31 virtual std::unique_ptr<ISharedState> createState(SharedStateContext&& context) = 0;
32
38 virtual std::unique_ptr<IEngine> createEngine(ISharedState* sharedState) = 0;
39
44 [[nodiscard]] virtual bool hasGui() const noexcept = 0;
45
52 virtual std::unique_ptr<IEditor> createEditor(ISharedState* sharedState) = 0;
53 };
54} // namespace mostly_harmless::core
55
61#define MH_REGISTER_PLUGIN_ENTRY(PluginEntryType) \
62 namespace mostly_harmless::core { \
63 std::unique_ptr<IPluginEntry> createPluginEntry() noexcept { \
64 return std::make_unique<PluginEntryType>(); \
65 } \
66 }
67
68#endif // MOSTLYHARMLESS_MOSTLYHARMLESS_IPLUGINENTRY_H
Interface for the plugin's audio processing functionality.
Definition mostlyharmless_IEngine.h:56
Base class for the plugin's shared state.
Definition mostlyharmless_ISharedState.h:26
Contains core functionality of the framework.
Definition mostlyharmless_PluginBase.h:15
Interface for the plugin's gui functionality.
Definition mostlyharmless_IEditor.h:19
Interface for registering the user's subclasses with the framework.
Definition mostlyharmless_IPluginEntry.h:20
virtual ~IPluginEntry() noexcept=default
virtual std::unique_ptr< IEditor > createEditor(ISharedState *sharedState)=0
virtual bool hasGui() const noexcept=0
virtual std::unique_ptr< IEngine > createEngine(ISharedState *sharedState)=0
virtual std::unique_ptr< ISharedState > createState(SharedStateContext &&context)=0