Skip to content
Snippets Groups Projects
Commit dd1ec536 authored by Jason Hiser's avatar Jason Hiser :tractor:
Browse files

cleaning up thanos-plugin capability

parent 85a2d55a
No related branches found
No related tags found
No related merge requests found
......@@ -17,18 +17,36 @@
namespace IRDB_SDK
{
class TransformStepState_t;
class ThanosPlugin_t;
using namespace std;
class TransformStep_t
{
protected:
TransformStep_t() { }
public:
virtual ~TransformStep_t(void) { }
virtual string getStepName(void) const = 0;
// abstract methods for plugin to implement
virtual string getStepName(void) const = 0;
virtual int parseArgs(const vector<string> step_args) = 0;
virtual int executeStep() = 0;
protected:
TransformStep_t() { } // Thanos plugins can create these
// helper methods for plugin to use
virtual File_t* getMainFile() final;
virtual FileIR_t* getMainFileIR() final;
virtual DatabaseID_t getVariantID() final;
virtual IRDBObjects_t*const getIRDBObjects() final;
private:
// private data can only be accessed by protected accessors.
TransformStepState_t* m_state = nullptr;
virtual void setState(TransformStepState_t* p_state) final;
friend class ThanosPlugin_t;
virtual int parseArgs(const vector<string> step_args) = 0;
virtual int executeStep(IRDBObjects_t *const irdb_objects) = 0;
};
}
......@@ -38,6 +56,10 @@ namespace IRDB_SDK
// so that thanos can use it as a factory to create your transform class. It must
// follow this signature:
//
// extern "C" std::shared_ptr<TransformStep_t> GetTransformStep(void);
// extern "C" std::shared_ptr<TransformStep_t> getTransformStep(void);
// {
// return shared_ptr<TransformStep_t>(new YourClassHere_t());
// }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment