27 lines
517 B
C++
27 lines
517 B
C++
#ifndef MODULE_H
|
|
#define MODULE_H
|
|
|
|
#include "pch.hpp"
|
|
|
|
class Module {
|
|
|
|
public:
|
|
typedef Module* create_t(void*);
|
|
typedef void* destroy_t(Module*);
|
|
|
|
|
|
virtual ~Module() {}
|
|
virtual void run() = 0;
|
|
std::string getName() const { return name; }
|
|
void* getHandle() { return handle; }
|
|
|
|
void setSelf(std::list<Module*>::iterator s) { self = s; }
|
|
|
|
protected:
|
|
std::string name;
|
|
void* handle;
|
|
std::list<Module*>::iterator self;
|
|
};
|
|
|
|
#endif
|