33 void Added(std::shared_ptr<TickableComponent> part,
const bool forced)
override;
37#ifdef COMPONENT_THREAD_SAFE
38 const std::lock_guard<std::recursive_mutex> lock(
GetMutex());
41 std::stable_sort(list.begin(), list.end(),
42 [](
const std::shared_ptr<TickableComponent>& a,
const std::shared_ptr<TickableComponent>& b) {
43 return a->GetOrder() < b->GetOrder();
A thread-safe ordered list of Parts.
Definition PartList.h:114
std::recursive_mutex & GetMutex() const
Returns the internal recursive mutex used to guard list access.
Definition PartList.h:745
std::enable_if< std::is_same< P, std::shared_ptr< TickableComponent > >::value, std::vector< P > & >::type GetList()
Direct access to the underlying vector for strong-storage lists.
Definition PartList.h:733
Combines Tickable and Component, auto-registering with a Context.
Definition TickableComponent.h:42
Extends PartList<TickableComponent> with order-aware sorting.
Definition TickableList.h:18
void Added(std::shared_ptr< TickableComponent > part, const bool forced) override
Re-sorts the list after a component is added so that TickGroup / TickPriority ordering is honored dur...
Definition TickableList.h:48
TickableList & Sort()
Sorts the list by each component's composite order value.
Definition TickableList.h:36
Core namespace for the libultraship engine framework.
Definition gfx_direct3d_common.h:14