Common definitions for the pugg library.
More...
Go to the source code of this file.
|
enum class | return_type { success = 0
, warning
, error
, critical
} |
| The return type of common interface functions.
|
|
Common definitions for the pugg library.
◆ INSTALL_FILTER_DRIVER
#define INSTALL_FILTER_DRIVER |
( |
|
klass, |
|
|
|
type_in, |
|
|
|
type_out |
|
) |
| |
Value: class klass##Driver : public FilterDriver<type_in, type_out> { \
public: \
klass##Driver() : FilterDriver(PLUGIN_NAME, klass::version) {} \
Filter<type_in, type_out> *create() { return new klass(); } \
}; \
extern "C" EXPORTIT void register_pugg_plugin(pugg::Kernel *kernel) { \
kernel->add_driver(new klass##Driver()); \
}
Call this macro after defining a filter class to install it into the kernel.
- Parameters
-
klass | the class name |
type_in | the input type of the filter |
type_out | the output type of the filter |
◆ INSTALL_SOURCE_DRIVER
#define INSTALL_SOURCE_DRIVER |
( |
|
klass, |
|
|
|
type |
|
) |
| |
Value: class klass##Driver : public SourceDriver<type> { \
public: \
klass##Driver() : SourceDriver(PLUGIN_NAME, klass::version) {} \
Source<type> *create() { return new klass(); } \
}; \
extern "C" EXPORTIT void register_pugg_plugin(pugg::Kernel *kernel) { \
kernel->add_driver(new klass##Driver()); \
}
Call this macro after defining a source class to install it into the kernel.
Install a source driver into the kernel.
- Parameters
-
klass | the class name |
type | the type of the source |