From c9793f0c8736887691c09a87ebddaf653c6216fa Mon Sep 17 00:00:00 2001 From: Matthew McGill <mhollismcgill@gmail.com> Date: Fri, 5 Oct 2018 17:24:44 +0000 Subject: [PATCH] Transform Step SDK Former-commit-id: 39ecc8fe2402ff7b13bfea36e7d1d719a2b541d9 --- libIRDB/include/util/IRDB_Objects.hpp | 4 ++-- libtransform/include/transform_step.h | 32 +++++++++++++++++++++++++ libtransform/include/transform_step.hpp | 10 -------- 3 files changed, 34 insertions(+), 12 deletions(-) create mode 100644 libtransform/include/transform_step.h delete mode 100644 libtransform/include/transform_step.hpp diff --git a/libIRDB/include/util/IRDB_Objects.hpp b/libIRDB/include/util/IRDB_Objects.hpp index 41f062525..da2a6e8dc 100644 --- a/libIRDB/include/util/IRDB_Objects.hpp +++ b/libIRDB/include/util/IRDB_Objects.hpp @@ -1,5 +1,5 @@ -#ifndef IRDB_Objects_h -#define IRDB_Objects_h +#ifndef IRDBObjects_h +#define IRDBObjects_h #include <map> #include <utility> diff --git a/libtransform/include/transform_step.h b/libtransform/include/transform_step.h new file mode 100644 index 000000000..5624af87d --- /dev/null +++ b/libtransform/include/transform_step.h @@ -0,0 +1,32 @@ +#ifndef TransformStep_h +#define TransformStep_h + +#include <libIRDB-util.hpp> + + +namespace Transform_SDK +{ + class TransformStep_t + { + public: + // Step names must be unique, allows arguments to + // be directed to their matching transform steps. + virtual std::string GetStepName(void) = 0; + + // Allows all steps to parse args before any step takes time to execute + virtual int ParseArgs(int argc, char* argv[]) + { + return 0; // success + } + + virtual int ExecuteStep(libIRDB::IRDB_Objects_t *irdb_objects) + { + return 0; // success + } + }; +} + +extern "C" +Transform_SDK::TransformStep_t* TransformStepFactory(void); + +#endif diff --git a/libtransform/include/transform_step.hpp b/libtransform/include/transform_step.hpp deleted file mode 100644 index c484f9c89..000000000 --- a/libtransform/include/transform_step.hpp +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef transform_step_h -#define transform_step_h - -#include <libIRDB-util.hpp> - - -extern "C" -int execute_step(int argc, char* argv[], libIRDB::IRFiles_t*); - -#endif -- GitLab