#include <utility>
#include <vector>
-namespace simgrid {
-namespace s4u {
+namespace simgrid::s4u {
/** @brief Simulation engine
*
* This is a singleton containing all the main functions of the simulation.
/** @brief Retrieves all netzones of the type indicated by the template argument */
template <class T> std::vector<T*> get_filtered_netzones() const
{
- static_assert(std::is_base_of<kernel::routing::NetZoneImpl, T>::value,
+ static_assert(std::is_base_of_v<kernel::routing::NetZoneImpl, T>,
"Filtering netzones is only possible for subclasses of kernel::routing::NetZoneImpl");
std::vector<T*> res;
get_filtered_netzones_recursive(get_netzone_root(), &res);
return res;
}
- kernel::EngineImpl* get_impl() const { return pimpl; }
+ 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
*
* @beginrst
- * Do --help on any simgrid binary to see the list of currently existing configuration variables
+ * Do --help on any SimGrid binary to see the list of currently existing configuration variables
* (see also :ref:`options`).
* @endrst
*
static xbt::signal<void(void)> on_deadlock;
static xbt::signal<void()> on_simulation_end;
- kernel::EngineImpl* const pimpl;
+ kernel::EngineImpl* const pimpl_;
static Engine* instance_;
void initialize(int* argc, char** argv);
};
std::vector<ActivityPtr> create_DAG_from_dot(const std::string& filename);
std::vector<ActivityPtr> create_DAG_from_DAX(const std::string& filename);
+std::vector<ActivityPtr> create_DAG_from_json(const std::string& filename);
#ifndef DOXYGEN /* Internal use only, no need to expose it */
template <class T>
XBT_PRIVATE void get_filtered_netzones_recursive(const s4u::NetZone* current, std::vector<T*>* whereto)
{
- static_assert(std::is_base_of<kernel::routing::NetZoneImpl, T>::value,
+ static_assert(std::is_base_of_v<kernel::routing::NetZoneImpl, T>,
"Filtering netzones is only possible for subclasses of kernel::routing::NetZoneImpl");
for (auto const& elem : current->get_children()) {
get_filtered_netzones_recursive(elem, whereto);
}
}
#endif
-} // namespace s4u
-} // namespace simgrid
+} // namespace simgrid::s4u
#endif /* SIMGRID_S4U_ENGINE_HPP */