|
26 | 26 | #include <gz/sim/Export.hh>
|
27 | 27 | #include <gz/sim/ServerConfig.hh>
|
28 | 28 | #include <gz/sim/SystemPluginPtr.hh>
|
| 29 | +#include <sdf/Element.hh> |
| 30 | +#include <sdf/Plugin.hh> |
29 | 31 |
|
30 | 32 | namespace gz
|
31 | 33 | {
|
@@ -225,14 +227,60 @@ namespace gz
|
225 | 227 | const SystemPluginPtr &_system,
|
226 | 228 | const unsigned int _worldIndex = 0);
|
227 | 229 |
|
| 230 | + /// \brief Add a System to the server. The server must not be running when |
| 231 | + /// calling this. |
| 232 | + /// \param[in] _system system to be added |
| 233 | + /// \param[in] _entity Entity of system to be added. |
| 234 | + /// If _entity is std::nullopt, it will be added to the world entity. |
| 235 | + /// \param[in] _sdf Pointer to the SDF element of a <plugin> tag with |
| 236 | + /// configuration options for the system being added. |
| 237 | + /// \param[in] _worldIndex Index of the world to query. |
| 238 | + /// \return Whether the system was added successfully, or std::nullopt |
| 239 | + /// if _worldIndex is invalid. |
| 240 | + public: std::optional<bool> AddSystem( |
| 241 | + const SystemPluginPtr &_system, |
| 242 | + std::optional<Entity> _entity, |
| 243 | + std::optional<std::shared_ptr<const sdf::Element>> _sdf, |
| 244 | + const unsigned int _worldIndex = 0); |
| 245 | + |
| 246 | + /// \brief Add a System to the server. The server must not be running when |
| 247 | + /// calling this. |
| 248 | + /// \param[in] _plugin system plugin to be added with any additional XML |
| 249 | + /// contents. |
| 250 | + /// \param[in] _entity Entity of system to be added. |
| 251 | + /// If _entity is std::nullopt, it will be added to the world entity. |
| 252 | + /// \param[in] _worldIndex Index of the world to query. |
| 253 | + /// \return Whether the system was added successfully, or std::nullopt |
| 254 | + /// if _worldIndex is invalid. |
| 255 | + public: std::optional<bool> AddSystem( |
| 256 | + const sdf::Plugin &_plugin, |
| 257 | + std::optional<Entity> _entity, |
| 258 | + const unsigned int _worldIndex = 0); |
| 259 | + |
| 260 | + /// \brief Add a System to the server. The server must not be running when |
| 261 | + /// calling this. |
| 262 | + /// \param[in] _system System to be added |
| 263 | + /// \param[in] _worldIndex Index of the world to add to. |
| 264 | + /// \return Whether the system was added successfully, or std::nullopt |
| 265 | + /// if _worldIndex is invalid. |
| 266 | + public: std::optional<bool> AddSystem( |
| 267 | + const std::shared_ptr<System> &_system, |
| 268 | + const unsigned int _worldIndex = 0); |
| 269 | + |
228 | 270 | /// \brief Add a System to the server. The server must not be running when
|
229 | 271 | /// calling this.
|
230 | 272 | /// \param[in] _system System to be added
|
| 273 | + /// \param[in] _entity Entity of system to be added. |
| 274 | + /// If _entity is std::nullopt, it will be added to the world entity. |
| 275 | + /// \param[in] _sdf Pointer to the SDF element of a <plugin> tag with |
| 276 | + /// configuration options for the system being added |
231 | 277 | /// \param[in] _worldIndex Index of the world to add to.
|
232 | 278 | /// \return Whether the system was added successfully, or std::nullopt
|
233 | 279 | /// if _worldIndex is invalid.
|
234 | 280 | public: std::optional<bool> AddSystem(
|
235 | 281 | const std::shared_ptr<System> &_system,
|
| 282 | + std::optional<Entity> _entity, |
| 283 | + std::optional<std::shared_ptr<const sdf::Element>> _sdf, |
236 | 284 | const unsigned int _worldIndex = 0);
|
237 | 285 |
|
238 | 286 | /// \brief Get an Entity based on a name.
|
|
0 commit comments