20 #ifndef WORLD_BUILDER_FEATURES_FAULT_MODELS_GRAINS_INTERFACE_H 21 #define WORLD_BUILDER_FEATURES_FAULT_MODELS_GRAINS_INTERFACE_H 35 template <
unsigned int dim>
class Point;
43 using namespace FeatureUtilities;
69 const std::string &parent_name,
70 const std::vector<std::string> &required_entries);
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_FAULT_GRAINS_MODEL(classname,name) \ 156 class classname##Factory : public ObjectFactory { \ 158 classname##Factory() \ 160 Interface::registerType(#name, classname::declare_entries, this); \ 162 virtual 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;
std::string get_name() const
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()