plugin  0.1.0
common.hpp
Go to the documentation of this file.
1 #ifndef COMMON_HPP
2 #define COMMON_HPP
3 
19 #define INSTALL_SOURCE_DRIVER(klass, type) \
20  class klass##Driver : public SourceDriver<type> { \
21  public: \
22  klass##Driver() : SourceDriver(PLUGIN_NAME, klass::version) {} \
23  Source<type> *create() { return new klass(); } \
24  }; \
25  extern "C" EXPORTIT void register_pugg_plugin(pugg::Kernel *kernel) { \
26  kernel->add_driver(new klass##Driver()); \
27  }
28 
38 #define INSTALL_FILTER_DRIVER(klass, type_in, type_out) \
39  class klass##Driver : public FilterDriver<type_in, type_out> { \
40  public: \
41  klass##Driver() : FilterDriver(PLUGIN_NAME, klass::version) {} \
42  Filter<type_in, type_out> *create() { return new klass(); } \
43  }; \
44  extern "C" EXPORTIT void register_pugg_plugin(pugg::Kernel *kernel) { \
45  kernel->add_driver(new klass##Driver()); \
46  }
47 
48 
52 enum class return_type {
53  success = 0,
54  warning,
55  error,
56  critical
57 };
58 
59 typedef float data_t;
60 
61 
62 #endif // COMMON_HPP
return_type
The return type of common interface functions.
Definition: common.hpp:52