diff --git a/extras/Hadrons/Modules/templates/Module.cc.template b/extras/Hadrons/Modules/templates/Module.cc.template index 5cd7664d..0c509d6d 100644 --- a/extras/Hadrons/Modules/templates/Module.cc.template +++ b/extras/Hadrons/Modules/templates/Module.cc.template @@ -4,22 +4,22 @@ using namespace Grid; using namespace Hadrons; /****************************************************************************** -* ___FILEBASENAME___ implementation * +* T___FILEBASENAME___ implementation * ******************************************************************************/ // constructor ///////////////////////////////////////////////////////////////// -___FILEBASENAME___::___FILEBASENAME___(const std::string name) +T___FILEBASENAME___::T___FILEBASENAME___(const std::string name) : Module<___FILEBASENAME___Par>(name) {} // dependencies/products /////////////////////////////////////////////////////// -std::vector ___FILEBASENAME___::getInput(void) +std::vector T___FILEBASENAME___::getInput(void) { std::vector in; return in; } -std::vector ___FILEBASENAME___::getOutput(void) +std::vector T___FILEBASENAME___::getOutput(void) { std::vector out = {getName()}; @@ -27,13 +27,13 @@ std::vector ___FILEBASENAME___::getOutput(void) } // setup /////////////////////////////////////////////////////////////////////// -void ___FILEBASENAME___::setup(void) +void T___FILEBASENAME___::setup(void) { } // execution /////////////////////////////////////////////////////////////////// -void ___FILEBASENAME___::execute(void) +void T___FILEBASENAME___::execute(void) { } diff --git a/extras/Hadrons/Modules/templates/Module.hpp.template b/extras/Hadrons/Modules/templates/Module.hpp.template index bee4e618..fb43260f 100644 --- a/extras/Hadrons/Modules/templates/Module.hpp.template +++ b/extras/Hadrons/Modules/templates/Module.hpp.template @@ -17,13 +17,13 @@ public: unsigned int, i); }; -class ___FILEBASENAME___: public Module<___FILEBASENAME___Par> +class T___FILEBASENAME___: public Module<___FILEBASENAME___Par> { public: // constructor - ___FILEBASENAME___(const std::string name); + T___FILEBASENAME___(const std::string name); // destructor - virtual ~___FILEBASENAME___(void) = default; + virtual ~T___FILEBASENAME___(void) = default; // dependency relation virtual std::vector getInput(void); virtual std::vector getOutput(void); @@ -33,7 +33,7 @@ public: virtual void execute(void); }; -MODULE_REGISTER(___FILEBASENAME___); +MODULE_REGISTER(___FILEBASENAME___, T___FILEBASENAME___); END_HADRONS_NAMESPACE diff --git a/extras/Hadrons/Modules/templates/Module_in_NS.cc.template b/extras/Hadrons/Modules/templates/Module_in_NS.cc.template index 64bc7aa9..8b2a0ec0 100644 --- a/extras/Hadrons/Modules/templates/Module_in_NS.cc.template +++ b/extras/Hadrons/Modules/templates/Module_in_NS.cc.template @@ -5,22 +5,22 @@ using namespace Hadrons; using namespace ___NAMESPACE___; /****************************************************************************** -* ___FILEBASENAME___ implementation * +* T___FILEBASENAME___ implementation * ******************************************************************************/ // constructor ///////////////////////////////////////////////////////////////// -___FILEBASENAME___::___FILEBASENAME___(const std::string name) +T___FILEBASENAME___::T___FILEBASENAME___(const std::string name) : Module<___FILEBASENAME___Par>(name) {} // dependencies/products /////////////////////////////////////////////////////// -std::vector ___FILEBASENAME___::getInput(void) +std::vector T___FILEBASENAME___::getInput(void) { std::vector in; return in; } -std::vector ___FILEBASENAME___::getOutput(void) +std::vector T___FILEBASENAME___::getOutput(void) { std::vector out = {getName()}; @@ -28,13 +28,13 @@ std::vector ___FILEBASENAME___::getOutput(void) } // setup /////////////////////////////////////////////////////////////////////// -void ___FILEBASENAME___::setup(void) +void T___FILEBASENAME___::setup(void) { } // execution /////////////////////////////////////////////////////////////////// -void ___FILEBASENAME___::execute(void) +void T___FILEBASENAME___::execute(void) { } diff --git a/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template b/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template index 490e5a78..ece2bb58 100644 --- a/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template +++ b/extras/Hadrons/Modules/templates/Module_in_NS.hpp.template @@ -19,13 +19,13 @@ public: unsigned int, i); }; -class ___FILEBASENAME___: public Module<___FILEBASENAME___Par> +class T___FILEBASENAME___: public Module<___FILEBASENAME___Par> { public: // constructor - ___FILEBASENAME___(const std::string name); + T___FILEBASENAME___(const std::string name); // destructor - virtual ~___FILEBASENAME___(void) = default; + virtual ~T___FILEBASENAME___(void) = default; // dependency relation virtual std::vector getInput(void); virtual std::vector getOutput(void); @@ -35,9 +35,9 @@ public: virtual void execute(void); }; -END_MODULE_NAMESPACE +MODULE_REGISTER_NS(___FILEBASENAME___, T___FILEBASENAME___, ___NAMESPACE___); -MODULE_REGISTER_NS(___FILEBASENAME___, ___NAMESPACE___); +END_MODULE_NAMESPACE END_HADRONS_NAMESPACE diff --git a/extras/Hadrons/Modules/templates/Module_tmp.hpp.template b/extras/Hadrons/Modules/templates/Module_tmp.hpp.template index 53bee52b..2ee053a9 100644 --- a/extras/Hadrons/Modules/templates/Module_tmp.hpp.template +++ b/extras/Hadrons/Modules/templates/Module_tmp.hpp.template @@ -34,7 +34,7 @@ public: virtual void execute(void); }; -typedef T___FILEBASENAME___ ___FILEBASENAME___; +MODULE_REGISTER(___FILEBASENAME___, T___FILEBASENAME___); /****************************************************************************** * T___FILEBASENAME___ implementation * @@ -76,8 +76,6 @@ void T___FILEBASENAME___::execute(void) } -MODULE_REGISTER(___FILEBASENAME___); - END_HADRONS_NAMESPACE #endif // Hadrons____FILEBASENAME____hpp_ diff --git a/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template b/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template index e7ff8ace..a330652d 100644 --- a/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template +++ b/extras/Hadrons/Modules/templates/Module_tmp_in_NS.hpp.template @@ -36,7 +36,7 @@ public: virtual void execute(void); }; -typedef T___FILEBASENAME___ ___FILEBASENAME___; +MODULE_REGISTER_NS(___FILEBASENAME___, T___FILEBASENAME___, ___NAMESPACE___); /****************************************************************************** * T___FILEBASENAME___ implementation * @@ -80,8 +80,6 @@ void T___FILEBASENAME___::execute(void) END_MODULE_NAMESPACE -MODULE_REGISTER_NS(___FILEBASENAME___, ___NAMESPACE___); - END_HADRONS_NAMESPACE #endif // Hadrons____FILEBASENAME____hpp_