|
ampsci
High-precision calculations for one- and two-valence atomic systems
|
Helper struct: constructing a Register adds a module to the Registry.
Used at file scope (inside an anonymous namespace) in every module .cpp file to self-register that module with the Registry. The constructor is the only thing of interest – it runs once, before main(), as part of static initialisation.
See the namespace-level documentation above for the usage pattern.
registrar, r_myModule, ...); the anonymous namespace gives it internal linkage so different files can reuse the same identifier without clashing. #include <Modules.hpp>
Public Member Functions | |
| Register (const char *name, const char *description, ModuleFn fn) | |
| Register a module by constructing one of these at file scope. | |
|
inline |
Register a module by constructing one of these at file scope.
| name | Module name as used in input files: Module::<name>{}. |
| description | One-line description, shown by ./ampsci -m. |
| fn | Pointer to the module function. |