-void EngineImpl::register_default(int (*code)(int, char**)) // deprecated
-{
- simix_global->default_function = [code](std::vector<std::string> args) {
- return xbt::wrap_main(code, std::move(args));
- };
-}
-void EngineImpl::register_default(xbt_main_func_t code)
-{
- simix_global->default_function = [code](std::vector<std::string> args) {
- return xbt::wrap_main(code, std::move(args));
- };
+ for (const auto dep : dependencies) {
+ xbt_assert(models_prio_.find(dep->get_name()) != models_prio_.end(),
+ "Model %s doesn't exists. Impossible to use it as dependency.", dep->get_name().c_str());
+ }
+ models_.push_back(model.get());
+ models_prio_[model_name] = std::move(model);