plugin  0.1.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
Source< Tout > Class Template Referenceabstract

#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
 

Detailed Description

template<typename Tout = std::vector<double>>
class Source< Tout >

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.

Template Parameters
ToutOutput data type

Member Function Documentation

◆ blob_format()

template<typename Tout = std::vector<double>>
std::string Source< Tout >::blob_format ( )
inline

Returns the format of the blob data provided by get_output().

◆ error()

template<typename Tout = std::vector<double>>
std::string Source< Tout >::error ( )
inline

Returns the error message

This method returns the error message.

Returns
The error message

◆ get_output()

template<typename Tout = std::vector<double>>
virtual return_type Source< Tout >::get_output ( Tout *  out,
std::vector< unsigned char > *  blob = nullptr 
)
pure virtual

Get the output data

This method provides the output data. It returns true if the data was fetched successfully, and false otherwise.

Parameters
outThe output data
Returns
True if the data was processed successfully, and false otherwise

Implemented in HPEQuick.

◆ info()

template<typename Tout = std::vector<double>>
virtual std::map<std::string, std::string> Source< Tout >::info ( )
pure virtual

Returns the filter information

This method returns the filter information. It returns a map with keys and values describing the filter.

Returns
The filter information

Implemented in Skeletonizer3D, and HPEQuick.

◆ kind()

template<typename Tout = std::vector<double>>
virtual std::string Source< Tout >::kind ( )
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.

Returns
The kind of source

Implemented in Skeletonizer3D, and HPEQuick.

◆ set_params()

template<typename Tout = std::vector<double>>
virtual void Source< Tout >::set_params ( void *  params)
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.

Parameters
paramsThe parameters (typically a pointer to a struct)

Reimplemented in Skeletonizer3D, and HPEQuick.

Member Data Documentation

◆ dummy

template<typename Tout = std::vector<double>>
bool Source< Tout >::dummy

Set it to true to enable dummy mode


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