17 #ifndef GZ_SIM_SERVER_HH_
18 #define GZ_SIM_SERVER_HH_
24 #include <gz/sim/config.hh>
26 #include <gz/sim/Export.hh>
35 inline namespace GZ_SIM_VERSION_NAMESPACE {
131 public:
void SetUpdatePeriod(
132 const std::chrono::steady_clock::duration &_updatePeriod,
133 const unsigned int _worldIndex = 0);
150 public:
bool Run(
const bool _blocking =
false,
151 const uint64_t _iterations = 0,
152 const bool _paused =
true);
161 public:
bool RunOnce(
const bool _paused =
true);
168 public:
bool Running()
const;
178 public: std::optional<bool> Running(
const unsigned int _worldIndex)
const;
187 public:
bool SetPaused(
const bool _paused,
188 const unsigned int _worldIndex = 0)
const;
196 public: std::optional<bool> Paused(
197 const unsigned int _worldIndex = 0)
const;
203 public: std::optional<uint64_t> IterationCount(
204 const unsigned int _worldIndex = 0)
const;
209 public: std::optional<size_t> EntityCount(
210 const unsigned int _worldIndex = 0)
const;
215 public: std::optional<size_t> SystemCount(
216 const unsigned int _worldIndex = 0)
const;
224 public: std::optional<bool> AddSystem(
226 const unsigned int _worldIndex = 0);
234 public: std::optional<bool> AddSystem(
236 const unsigned int _worldIndex = 0);
246 public: std::optional<Entity> EntityByName(
const std::string &_name,
247 const unsigned int _worldIndex = 0)
const;
256 const unsigned int _worldIndex = 0)
const;
271 public:
bool RequestRemoveEntity(
const std::string &_name,
272 bool _recursive =
true,
273 const unsigned int _worldIndex = 0);
286 public:
bool RequestRemoveEntity(
const Entity _entity,
287 bool _recursive =
true,
288 const unsigned int _worldIndex = 0);