$darkmode
#include <simulator.hpp>
Public Member Functions | |
| virtual std::unique_ptr< SimulatorFactory > | clone () const =0 |
| virtual std::unique_ptr< Simulator > | make (const Conf &c) const =0 |
Public Member Functions inherited from cloe::Entity | |
| Entity (const std::string &name) | |
| Entity (const std::string &name, const std::string &desc) | |
| std::string | name () const |
| void | set_name (const std::string &name) |
| std::string | description () const |
| void | set_description (const std::string &desc) |
Public Member Functions inherited from fable::Confable | |
| Confable (const Confable &) noexcept | |
| Confable (Confable &&) noexcept | |
| Confable & | operator= (const Confable &other) noexcept |
| Confable & | operator= (Confable &&other) noexcept |
| virtual void | reset_schema () |
| Schema & | schema () |
| const Schema & | schema () const |
| virtual void | validate (const Conf &c) const |
| virtual void | from_conf (const Conf &c) |
| virtual void | to_json (Json &j) const |
| Json | to_json () const |
Static Public Attributes | |
| static constexpr char const * | PLUGIN_TYPE = "simulator" |
| static constexpr char const * | PLUGIN_API_VERSION = "2.0" |
Additional Inherited Members | |
Protected Member Functions inherited from cloe::Entity | |
| virtual Logger | logger () const |
Protected Member Functions inherited from fable::Confable | |
| virtual Schema | schema_impl () |
Protected Attributes inherited from cloe::Entity | |
| std::string | name_ |
| std::string | desc_ |
A SimulatorFactory creates a new Simulator and is required for each Simulator implementation.
|
pure virtual |
Create a clone of the factory with its current configuration.
This cannot be done from the abstract class, but the implementation in most inheriting classes can be a oneliner:
return std::make_unique<std::decay<decltype(*this)>::type>(*this);
The above one-liner is only required for genericity and is equivalent to:
return std::make_unique<FoobarFactory>(*this);