20#include <unordered_map>
23#include "../TaskSystem/TaskGraphTemplate.h"
83 const std::vector<ExecPinConnection>&
GetOutgoing(
int nodeId)
const;
89 const std::vector<ExecPinConnection>&
GetIncoming(
int nodeId)
const;
100 std::unordered_map<int, std::vector<ExecPinConnection>>
m_Outgoing;
101 std::unordered_map<int, std::vector<ExecPinConnection>>
m_Incoming;
ComponentTypeID GetComponentTypeID_Static()
Singleton that caches per-node incoming/outgoing ExecPinConnection lists.
int GetConnectionCount() const
Returns the total number of connections stored in the cache.
const std::vector< ExecPinConnection > & GetIncoming(int nodeId) const
Returns the list of connections that terminate at nodeId.
void Invalidate()
Marks the cache as stale.
void Rebuild(const std::vector< ExecPinConnection > &connections)
Rebuilds both outgoing and incoming maps from the supplied list.
std::unordered_map< int, std::vector< ExecPinConnection > > m_Incoming
const std::vector< ExecPinConnection > & GetOutgoing(int nodeId) const
Returns the list of connections that originate from nodeId.
std::unordered_map< int, std::vector< ExecPinConnection > > m_Outgoing
bool IsValid() const
Returns true if the cache has been built and is not stale.
static LinkCache & Get()
Returns the single shared instance.
std::vector< ExecPinConnection > m_EmptyList
Returned for misses.
< Provides AssetID and INVALID_ASSET_ID