MostlyHarmless 0.0.1
 
Loading...
Searching...
No Matches
mostly_harmless::core::IPluginEntry Struct Referenceabstract

Interface for registering the user's subclasses with the framework. More...

#include <mostlyharmless_IPluginEntry.h>

Public Member Functions

virtual ~IPluginEntry () noexcept=default
 
virtual std::unique_ptr< ISharedStatecreateState (SharedStateContext &&context)=0
 
virtual std::unique_ptr< IEnginecreateEngine (ISharedState *sharedState)=0
 
virtual bool hasGui () const noexcept=0
 
virtual std::unique_ptr< IEditorcreateEditor (ISharedState *sharedState)=0
 

Detailed Description

Interface for registering the user's subclasses with the framework.

As detailed in the FX Plugin tutorial, users must implement this, ISharedState, IEngine, and optionally IEditor, and register their subclasses with the framework to create an audio plugin. These will also be created if using the provided create.py script.

Handles specifying the various subclasses the framework should create for ISharedState, IEngine and IEditor.

Constructor & Destructor Documentation

◆ ~IPluginEntry()

virtual mostly_harmless::core::IPluginEntry::~IPluginEntry ( )
virtualdefaultnoexcept

Virtual destructor.

Member Function Documentation

◆ createEditor()

virtual std::unique_ptr< IEditor > mostly_harmless::core::IPluginEntry::createEditor ( ISharedState * sharedState)
pure virtual

Override this to create an instance of your Editor class, deriving from IEditor (or descendents). If you've chosen not to provide a gui (and returned false from hasGui), you can return a nullptr here.

Parameters
sharedStateA pointer to the object returned from createState, to optionally pass to your IEditor subclass' constructor.
Returns
A unique_ptr containing an instance of your Editor class.

◆ createEngine()

virtual std::unique_ptr< IEngine > mostly_harmless::core::IPluginEntry::createEngine ( ISharedState * sharedState)
pure virtual

Override this to create an instance of your Engine class, deriving from IEngine.

Parameters
sharedStateA pointer to the object returned from createState, to optionally pass to your IEngine subclass' constructor.
Returns
A unique_ptr containing an instance of your Engine class.

◆ createState()

virtual std::unique_ptr< ISharedState > mostly_harmless::core::IPluginEntry::createState ( SharedStateContext && context)
pure virtual

Override this to create an instance of your Shared State class, deriving from ISharedState.

Parameters
contextA SharedStateContext instance, to be forwarded to ISharedState's constructor.
Returns
A unique_ptr containing an instance of your SharedState class.

◆ hasGui()

virtual bool mostly_harmless::core::IPluginEntry::hasGui ( ) const
nodiscardpure virtualnoexcept

Override this to specify whether or not your plugin provides a gui.

Returns
true if you've provided a gui, false otherwise.

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