cepgen is hosted by Hepforge, IPPP Durham
CepGen 1.2.5
Central exclusive processes event generator
Loading...
Searching...
No Matches
ModuleFactory.h File Reference
#include <memory>
#include <sstream>
#include "CepGen/Modules/NamedModule.h"
+ Include dependency graph for ModuleFactory.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ModuleFactory< T >
 A generic factory to build modules. More...
 

Namespaces

namespace  cepgen
 Common namespace for this Monte Carlo generator.
 

Macros

#define BUILDERNM(obj)   obj##Builder
 Name of the object builder.
 
#define DEFINE_FACTORY(name, obj_type, descr)
 Define a new factory instance for the definition of modules.
 

Macro Definition Documentation

◆ BUILDERNM

#define BUILDERNM (   obj)    obj##Builder

Definition at line 28 of file ModuleFactory.h.

◆ DEFINE_FACTORY

#define DEFINE_FACTORY (   name,
  obj_type,
  descr 
)
Value:
struct name : public ModuleFactory<obj_type> { \
explicit name() : ModuleFactory(descr) {} \
inline static name& get() { \
static name instance; \
return instance; \
} \
inline name& addIndex(int index, const std::string& mod_name) { \
indices_[index] = mod_name; \
return *this; \
} \
}; \
static_assert(true, "")

Definition at line 30 of file ModuleFactory.h.