mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
27 lines
557 B
C++
27 lines
557 B
C++
//============ Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose: A dictionary mapping from symbol to structure
|
|
//
|
|
// $Header: $
|
|
// $NoKeywords: $
|
|
//===========================================================================//
|
|
|
|
#pragma once
|
|
|
|
template <class T, class I>
|
|
class CUtlDict
|
|
{
|
|
public:
|
|
CUtlDict() {};
|
|
CUtlDict<T, I>(uintptr_t ptr) : m_Elements(ptr) {};
|
|
T Find(I entry);
|
|
|
|
private:
|
|
uintptr_t m_Elements;
|
|
};
|
|
|
|
template <class T, class I>
|
|
T CUtlDict<T, I>::Find(I entry)
|
|
{
|
|
return *(T*)(m_Elements + 24 * entry + 16);
|
|
} |