xentara-plugin v1.2.1
The Xentara Plugin Framework
|
#include <io/Driver.hpp>
Public Member Functions | |
virtual | ~Environment ()=0 |
Virtual destructor. | |
virtual auto | createComponent (const ComponentClass &componentClass, plugin::SharedFactory< Component > &factory) -> std::shared_ptr< Component >=0 |
Called by the framework to create a new top-level component. | |
virtual auto | createIoBatch (const IoBatchClass &ioBatchClass, plugin::SharedFactory< IoBatch > &factory) -> std::shared_ptr< IoBatch > |
Called by the framework to create a new I/O batch. | |
Public Member Functions inherited from xentara::utils::tools::DisableCopy | |
constexpr | DisableCopy () noexcept=default |
DisableCopy (const DisableCopy &)=delete | |
DisableCopy & | operator= (const DisableCopy &)=delete |
|
pure virtualdefault |
Virtual destructor.
|
pure virtual |
Called by the framework to create a new top-level component.
The implementation for this method must use the given factory to create a new component of the given component class:
If your driver requires access to the component later (for example, to poll or service it), you must store an std::weak_ptr to it somewhere.
The framework will call loadConfig() on the newly created component.
componentClass | The class for the new component |
factory | The factory that must be used to create the component |
std::runtime_error | The function must throw this exception (or a suitable subclass) if an error occurs |
|
virtual |
Called by the framework to create a new I/O batch.
The implementation for this method must use the given factory to create a new I/O batch of the given I/O batch class:
If your driver requires access to the I/O batch later (for example, to poll or service it), you must store an std::weak_ptr to it somewhere.
The framework will call loadConfig() on the newly created I/O batch.
ioBatchClass | The class for the new I/O batch |
factory | The factory that must be used to create the I/O batch |
std::runtime_error | The function must throw this exception (or a suitable subclass) if an error occurs |