score::InterfaceBase Class Referenceabstract

Base class for plug-in interfaces. More...

Inheritance diagram for score::InterfaceBase:
score::GenericComponentFactory< Process::ProcessModel, Execution::Context, Execution::ProcessComponentFactory > score::GenericComponentFactory< Process::ProcessModel, score::DocumentContext, LocalTree::ProcessComponentFactory > score::GenericComponentFactory< Process::ProcessModel, DocumentPlugin, ProcessComponentFactory > Audio::AudioFactory Curve::SegmentFactory Device::DeviceModelProvider Device::ProtocolFactory Execution::ClockFactory Execution::ExecutionAction Explorer::ListeningHandlerFactory Inspector::InspectorWidgetFactory Library::LibraryInterface Media::Settings::PluginSettingsTab Process::AutomatableFactory Process::LayerFactory Process::OfflineAction Process::PortFactory Process::ProcessDropHandler Process::ProcessModelFactory Recording::RecorderFactory Scenario::CoherencyCheckerFactoryInterface Scenario::Command::MoveEventFactoryInterface Scenario::Command::TriggerCommandFactory Scenario::DisplayedElementsProvider Scenario::DisplayedElementsToolPaletteFactory Scenario::DropHandler Scenario::IntervalDropHandler Scenario::IntervalResizer Transport::TransportInterface score::DocumentDelegateFactory score::DocumentPluginFactory score::GenericComponentFactory< Model_T, System_T, ComponentFactory_T > score::ObjectEditor score::PanelDelegateFactory score::SettingsDelegateFactory score::ValidityChecker

Detailed Description

Base class for plug-in interfaces.

The plug-in interfaces in score are organized as follows :

  • Each base interface should inherit from Interface<MyInterface>
  • There is a key type to identify each interface type : score::InterfaceKey
  • Then, each implementation of each interface should itself provide a key to identify itself with regards to the other implementations.

This then allows to :

// First get the interface list we are looking for, for instance
// the list of all process factories interface :
auto& iface_list = context.interfaces<MyInterfaceList>();
Used to access all the application-wide state and structures.
Definition: ApplicationContext.hpp:24
const T & interfaces() const
Access to a specific interface list.
Definition: ApplicationContext.hpp:67
  • Then look for the actual factory we want, obtained from user input for instance :
auto iface = iface_list.get(actual_factory_key);
// If iface is != nullptr, it means that we have a concrete factory to build
// a specific kind of process.

The actual hierarchy looks like :

InterfaceBase <- MyInterface <- MyImplementation
<- OtherInterface <- OtherImplementation1
<- OtherImplementation2

Public Member Functions

virtual InterfaceKey interfaceKey () const noexcept=0
 Identifies an interface uniquely.
 

The documentation for this class was generated from the following files: