SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
Options::protocols::FactoryCreation Struct Reference

Compile-time information for factory-creation. More...

#include <FactoryCreation.hpp>

Classes

struct  test

Detailed Description

Compile-time information for factory-creation.

A class conforming to this protocol is placed in the metavariables to provide information on the set of derived classes for each factory-creatable base class. The conforming class must provide the following type aliases:

  • factory_classes: A tmpl::map from the base class to the list of derived classes. List all derived classes that should be factory-creatable, e.g. through input-file options.

Here's an example for a class conforming to this protocol:

struct factory_creation
: tt::ConformsTo<Options::protocols::FactoryCreation> {
using factory_classes = tmpl::map<
tmpl::pair<OptionTest, tmpl::list<Test1, Test2, TestWithArg,
TestWithArg2, TestWithMetavars>>,
tmpl::pair<OtherBase, tmpl::list<OtherDerived>>>;
};

The documentation for this struct was generated from the following file:
  • src/Options/Protocols/FactoryCreation.hpp