mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-27 22:25:56 +01:00
Namespace
This commit is contained in:
parent
93f09818da
commit
c978c88521
@ -25,23 +25,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
See the full license in the file "LICENSE" in the top level distribution
|
See the full license in the file "LICENSE" in the top level distribution
|
||||||
directory
|
directory
|
||||||
*************************************************************************************/
|
*************************************************************************************/
|
||||||
/* END LEGAL */
|
/* END LEGAL */
|
||||||
#ifndef HMC_MODULES_H
|
#ifndef HMC_MODULES_H
|
||||||
#define HMC_MODULES_H
|
#define HMC_MODULES_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Define loadable, serializable modules
|
Define loadable, serializable modules
|
||||||
for the HMC execution
|
for the HMC execution
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Grid {
|
NAMESPACE_BEGIN(Grid);
|
||||||
|
|
||||||
// Empty class for no parameters
|
// Empty class for no parameters
|
||||||
class NoParameters{};
|
class NoParameters{};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Base class for modules with parameters
|
Base class for modules with parameters
|
||||||
*/
|
*/
|
||||||
template < class P >
|
template < class P >
|
||||||
class Parametrized{
|
class Parametrized{
|
||||||
@ -72,7 +72,7 @@ private:
|
|||||||
|
|
||||||
template <>
|
template <>
|
||||||
class Parametrized<NoParameters>{
|
class Parametrized<NoParameters>{
|
||||||
public:
|
public:
|
||||||
typedef NoParameters Parameters;
|
typedef NoParameters Parameters;
|
||||||
|
|
||||||
Parametrized(Parameters Par){};
|
Parametrized(Parameters Par){};
|
||||||
@ -93,7 +93,7 @@ class Parametrized<NoParameters>{
|
|||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
template <class Prod>
|
template <class Prod>
|
||||||
class HMCModuleBase {
|
class HMCModuleBase {
|
||||||
public:
|
public:
|
||||||
typedef Prod Product;
|
typedef Prod Product;
|
||||||
|
|
||||||
virtual Prod* getPtr() = 0;
|
virtual Prod* getPtr() = 0;
|
||||||
@ -110,7 +110,7 @@ class HMCModuleBase {
|
|||||||
|
|
||||||
template <class T, class TheFactory>
|
template <class T, class TheFactory>
|
||||||
class Registrar {
|
class Registrar {
|
||||||
public:
|
public:
|
||||||
Registrar(std::string className) {
|
Registrar(std::string className) {
|
||||||
// register the class factory function
|
// register the class factory function
|
||||||
TheFactory::getInstance().registerBuilder(className,
|
TheFactory::getInstance().registerBuilder(className,
|
||||||
@ -122,9 +122,6 @@ class Registrar {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
NAMESPACE_END(Grid);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endif //HMC_MODULES_H
|
#endif //HMC_MODULES_H
|
Loading…
x
Reference in New Issue
Block a user