]> code.bitgloo.com Git - clyne/entityx.git/commitdiff
Rename SystemManager::update_all() and Add Documentation
authorDavid LeGare <excaliburhissheath@gmail.com>
Sat, 20 Dec 2014 16:25:47 +0000 (10:25 -0600)
committerDavid LeGare <excaliburhissheath@gmail.com>
Sat, 20 Dec 2014 16:25:47 +0000 (10:25 -0600)
- Renamed SystemManager::updateAll() to SystemManager::update_all() to
make it consistent with the existing naming convention.
- Added documentation for SystemManager::update_all().

entityx/System.cc
entityx/System.h
entityx/System_test.cc

index fb020fdbb68e1ba702c2e5fbc8a4e993e719af57..009ac9cc7766a0eb14cd194d62be13547acf9f45 100644 (file)
@@ -17,7 +17,7 @@ BaseSystem::Family BaseSystem::family_counter_;
 BaseSystem::~BaseSystem() {
 }
 
-void SystemManager::updateAll(TimeDelta dt) {
+void SystemManager::update_all(TimeDelta dt) {
   assert(initialized_ && "SystemManager::configure() not called");
   for (auto &pair : systems_) {
     pair.second->update(entity_manager_, event_manager_, dt);
index 3aad9ea40e9f9e9fa9c8b08db9799fbb4b955c7d..7c90ef57fc26030b2c8cece39e92c4c199024a02 100644 (file)
@@ -142,7 +142,18 @@ class SystemManager : entityx::help::NonCopyable {
     s->update(entity_manager_, event_manager_, dt);
   }
 
-  void updateAll(TimeDelta dt);
+  /**
+   * Call System::update() on all registered systems.
+   *
+   * The order which the registered systems are updated is arbitrary but consistent,
+   * meaning the order which they will be updated cannot be specified, but that order
+   * will stay the same as long no systems are added or removed.
+   *
+   * If the order in which systems update is important, use SystemManager::update()
+   * to manually specify the update order. EntityX does not yet support a way of
+   * specifying priority for update_all().
+   */
+  void update_all(TimeDelta dt);
 
   /**
    * Configure the system. Call after adding all Systems.
index dabb8e8b22804ac1b3f5b5551ab92fe89afcb770..581035733b2406ae345a7ca126e7e92cd4c3c9ff 100644 (file)
@@ -117,7 +117,7 @@ TEST_CASE_METHOD(EntitiesFixture, "TestApplyAllSystems") {
   systems.add<CounterSystem>();
   systems.configure();
 
-  systems.updateAll(0.0);
+  systems.update_all(0.0);
   Position::Handle position;
   Direction::Handle direction;
   Counter::Handle counter;