1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

Hadrons: module templates update

This commit is contained in:
Antonin Portelli 2016-12-14 18:19:46 +00:00
parent decbb61ec1
commit f3e49e4b73
6 changed files with 23 additions and 27 deletions

View File

@ -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<std::string> ___FILEBASENAME___::getInput(void)
std::vector<std::string> T___FILEBASENAME___::getInput(void)
{
std::vector<std::string> in;
return in;
}
std::vector<std::string> ___FILEBASENAME___::getOutput(void)
std::vector<std::string> T___FILEBASENAME___::getOutput(void)
{
std::vector<std::string> out = {getName()};
@ -27,13 +27,13 @@ std::vector<std::string> ___FILEBASENAME___::getOutput(void)
}
// setup ///////////////////////////////////////////////////////////////////////
void ___FILEBASENAME___::setup(void)
void T___FILEBASENAME___::setup(void)
{
}
// execution ///////////////////////////////////////////////////////////////////
void ___FILEBASENAME___::execute(void)
void T___FILEBASENAME___::execute(void)
{
}

View File

@ -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<std::string> getInput(void);
virtual std::vector<std::string> getOutput(void);
@ -33,7 +33,7 @@ public:
virtual void execute(void);
};
MODULE_REGISTER(___FILEBASENAME___);
MODULE_REGISTER(___FILEBASENAME___, T___FILEBASENAME___);
END_HADRONS_NAMESPACE

View File

@ -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<std::string> ___FILEBASENAME___::getInput(void)
std::vector<std::string> T___FILEBASENAME___::getInput(void)
{
std::vector<std::string> in;
return in;
}
std::vector<std::string> ___FILEBASENAME___::getOutput(void)
std::vector<std::string> T___FILEBASENAME___::getOutput(void)
{
std::vector<std::string> out = {getName()};
@ -28,13 +28,13 @@ std::vector<std::string> ___FILEBASENAME___::getOutput(void)
}
// setup ///////////////////////////////////////////////////////////////////////
void ___FILEBASENAME___::setup(void)
void T___FILEBASENAME___::setup(void)
{
}
// execution ///////////////////////////////////////////////////////////////////
void ___FILEBASENAME___::execute(void)
void T___FILEBASENAME___::execute(void)
{
}

View File

@ -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<std::string> getInput(void);
virtual std::vector<std::string> 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

View File

@ -34,7 +34,7 @@ public:
virtual void execute(void);
};
typedef T___FILEBASENAME___<FIMPL> ___FILEBASENAME___;
MODULE_REGISTER(___FILEBASENAME___, T___FILEBASENAME___<FIMPL>);
/******************************************************************************
* T___FILEBASENAME___ implementation *
@ -76,8 +76,6 @@ void T___FILEBASENAME___<FImpl>::execute(void)
}
MODULE_REGISTER(___FILEBASENAME___);
END_HADRONS_NAMESPACE
#endif // Hadrons____FILEBASENAME____hpp_

View File

@ -36,7 +36,7 @@ public:
virtual void execute(void);
};
typedef T___FILEBASENAME___<FIMPL> ___FILEBASENAME___;
MODULE_REGISTER_NS(___FILEBASENAME___, T___FILEBASENAME___<FIMPL>, ___NAMESPACE___);
/******************************************************************************
* T___FILEBASENAME___ implementation *
@ -80,8 +80,6 @@ void T___FILEBASENAME___<FImpl>::execute(void)
END_MODULE_NAMESPACE
MODULE_REGISTER_NS(___FILEBASENAME___, ___NAMESPACE___);
END_HADRONS_NAMESPACE
#endif // Hadrons____FILEBASENAME____hpp_