Rebel Fork Framework
Urho3D::SubsystemCache Class Reference

Public Types

using Container = ea::unordered_map<StringHash, SharedPtr<Object>>
 Container for dynamic subsystems.

Public Member Functions

 SubsystemCache ()
 Construct.
 ~SubsystemCache ()
 Destruct.
void Add (StringHash type, Object *subsystem)
 Add subsystem.
void Remove (StringHash type)
 Remove subsystem.
void Clear ()
 Remove all subsystems.
Object * Get (StringHash type) const
 Return subsystem by dynamic type.
template<class T>
T * Get () const
 Return subsystem by static type.
const Container & GetContainer () const
 Return all subsystems.

Private Member Functions

unsigned GetCacheIndex (StringHash type) const
 Return cache index for given type.

Static Private Member Functions

template<class ... Types>
static ea::array< StringHash, NumCachedSubsystems > GetCachedSubsystemTypes (ea::tuple< Types... > *)
 Return cached subsystem types.

Private Attributes

ea::array< Object *, NumCachedSubsystems > cachedSubsystems_ {}
 Cached subsytems.
ea::array< StringHash, NumCachedSubsystems > cachedSubsystemTypes_ {}
 Cached subsystem types.
Container subsystems_
 Subsystems (dynamic hash map).

Static Private Attributes

static const unsigned NumCachedSubsystems = ea::tuple_size_v<CachedSubsystemList>
 Number of cached subsystems.

The documentation for this class was generated from the following files:
  • Urho3D/Core/SubsystemCache.h
  • Urho3D/Core/SubsystemCache.cpp