#endif
/** Finalize the default engine and all its dependencies */
- static void shutdown();
+ void shutdown();
/** Run the simulation after initialization */
void run() const;
/** @brief Retrieve the engine singleton */
static s4u::Engine* get_instance();
static s4u::Engine* get_instance(int* argc, char** argv);
+ static bool has_instance() { return instance_ != nullptr; }
void load_platform(const std::string& platf) const;
-#ifndef DOXYGEN
- XBT_ATTRIB_DEPRECATED_v330("Please change the return code of your actors to void") void register_function(
- const std::string& name, int (*code)(int, char**));
- XBT_ATTRIB_DEPRECATED_v330("Please change the return code of your actors to void") void register_default(
- int (*code)(int, char**));
-#endif
-
void register_function(const std::string& name, const std::function<void(int, char**)>& code);
void register_function(const std::string& name, const std::function<void(std::vector<std::string>)>& code);
void register_function(const std::string& name, const kernel::actor::ActorCodeFactory& factory);
return res;
}
+ kernel::EngineImpl* get_impl() const { return pimpl; }
+
/** Returns whether SimGrid was initialized yet -- mostly for internal use */
static bool is_initialized();
/** @brief set a configuration variable