VoiceAssistant  main
Resource-efficient, customizable voice assistant
Loading...
Searching...
No Matches
PluginInterface Class Referenceabstract

The PluginInterface class is an abstract interface for plugin functionality. More...

#include <base.h>

Collaboration diagram for PluginInterface:
[legend]

Public Member Functions

virtual ~PluginInterface ()=default
 
virtual bool isValid (const QString &input)=0
 isValid checks if a plugin is valid for the given input.
 
virtual void run (const QString &input)=0
 run executes the plugin functionality.
 
void setBridge (PluginBridge *b)
 setBridge sets the bridge for the plugin to communicate with the host application.
 

Public Attributes

PluginBridgebridge = nullptr
 

Detailed Description

The PluginInterface class is an abstract interface for plugin functionality.

PluginInterface provides an interface for defining and implementing plugin functionality. Plugins that implement this interface can be loaded dynamically at runtime.

Definition at line 18 of file base.h.

Constructor & Destructor Documentation

◆ ~PluginInterface()

virtual PluginInterface::~PluginInterface ( )
virtualdefault

Member Function Documentation

◆ isValid()

virtual bool PluginInterface::isValid ( const QString &  input)
pure virtual

isValid checks if a plugin is valid for the given input.

Parameters
inputThe input to check.
Returns
True if the plugin is valid for the given input, false otherwise.

◆ run()

virtual void PluginInterface::run ( const QString &  input)
pure virtual

run executes the plugin functionality.

Parameters
inputThe input to process.

◆ setBridge()

void PluginInterface::setBridge ( PluginBridge b)
inline

setBridge sets the bridge for the plugin to communicate with the host application.

Parameters
bThe PluginBridge object.

The bridge is used for communication between the plugin and the host application. It allows the plugin to interact with the host application's functionality and services.

Definition at line 43 of file base.h.

Member Data Documentation

◆ bridge

PluginBridge* PluginInterface::bridge = nullptr

Definition at line 49 of file base.h.


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