plugin
0.1.0
|
#include <source.hpp>
Public Member Functions | |
virtual std::string | kind ()=0 |
virtual return_type | get_output (Tout *out, std::vector< unsigned char > *blob=nullptr)=0 |
virtual void | set_params (void *params) |
virtual std::map< std::string, std::string > | info ()=0 |
std::string | error () |
std::string | blob_format () |
Static Public Member Functions | |
static const std::string | server_name () |
Public Attributes | |
bool | dummy |
Static Public Attributes | |
static const int | version = 2 |
Protected Attributes | |
std::string | _blob_format |
std::string | _error |
Base class for sources
This class is the base class for all sources. It defines the interface for providing output of data internally acquired. Child classes must implement the Source::kind() and Source::get_output() methods. Optionally, they can implement the Source::set_params() method to receive parameters as a void pointer.
After deriving the class, remember to call the INSTALL_SOURCE_DRIVER(klass, type) macro to enable the plugin to be loaded by the kernel.
Tout | Output data type |
|
inline |
Returns the format of the blob data provided by get_output().
|
inline |
Returns the error message
This method returns the error message.
|
pure virtual |
Get the output data
This method provides the output data. It returns true if the data was fetched successfully, and false otherwise.
out | The output data |
Implemented in HPEQuick.
|
pure virtual |
Returns the filter information
This method returns the filter information. It returns a map with keys and values describing the filter.
Implemented in Skeletonizer3D, and HPEQuick.
|
pure virtual |
Returns the kind of source
This method returns the kind of source. It is used to identify the source when loading it from a plugin.
Implemented in Skeletonizer3D, and HPEQuick.
|
inlinevirtual |
Sets the parameters
This method sets the parameters for the source. It receives a void pointer to the parameters. The child class must cast the pointer to the correct type.
params | The parameters (typically a pointer to a struct) |
Reimplemented in Skeletonizer3D, and HPEQuick.
bool Source< Tout >::dummy |
Set it to true to enable dummy mode