20 #ifndef WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_COMPOSITION_INTERFACE_H 21 #define WORLD_BUILDER_FEATURES_SUBDUCTING_PLATE_MODELS_COMPOSITION_INTERFACE_H 35 template <
unsigned int dim>
class Point;
43 using namespace FeatureUtilities;
45 namespace SubductingPlateModels
70 const std::string &parent_name,
71 const std::vector<std::string> &required_entries);
84 double get_composition(
const Point<3> &position,
86 const unsigned int composition_number,
88 const double feature_min_depth,
89 const double feature_max_depth,
96 static void registerType(
const std::string &name,
105 static std::unique_ptr<Interface> create(
const std::string &name,
WorldBuilder::World *world);
128 static std::map<std::string, ObjectFactory *> factories;
132 static std::map<std::string, void ( *)(Parameters &,const std::string &)> &
get_declare_map()
134 static std::map<std::string, void ( *)(Parameters &,const std::string &)> declares;
147 virtual std::unique_ptr<Interface> create(
World *world) = 0;
155 #define WB_REGISTER_FEATURE_SUBDUCTING_PLATE_COMPOSITION_MODEL(classname,name) \ 156 class classname##Factory : public ObjectFactory { \ 158 classname##Factory() \ 160 Interface::registerType(#name, classname::declare_entries, this); \ 162 std::unique_ptr<Interface> create(World *world) override final { \ 163 return std::unique_ptr<Interface>(new classname(world)); \ 166 static classname##Factory global_##classname##Factory;
static std::map< std::string, ObjectFactory * > & get_factory_map()
WorldBuilder::World * world
static std::map< std::string, void(*)(Parameters &, const std::string &)> & get_declare_map()
std::string get_name() const