Tramway SDK
Public Member Functions | Protected Types | Protected Attributes | List of all members
tram::Hashmap< T > Class Template Reference

#include <hashmap.h>

Public Member Functions

 Hashmap (std::string name, size_t max_size)
 
 Hashmap (std::string name, size_t max_size, std::initializer_list< std::pair< uint64_t, T > > list)
 
Find (UID key)
 
Find (uint64_t key)
 
void Insert (UID key, T value)
 
void Insert (uint64_t key, T value)
 

Protected Types

typedef std::pair< uint64_t, T > PAIR
 

Protected Attributes

const size_t padding = 10
 
std::string name
 
size_t size = 0
 
size_t max_size = 0
 
PAIRfirst = nullptr
 
PAIRlast = nullptr
 

Member Typedef Documentation

◆ PAIR

template<typename T >
typedef std::pair<uint64_t, T> tram::Hashmap< T >::PAIR
protected

Constructor & Destructor Documentation

◆ Hashmap() [1/2]

template<typename T >
tram::Hashmap< T >::Hashmap ( std::string  name,
size_t  max_size 
)
inline

◆ Hashmap() [2/2]

template<typename T >
tram::Hashmap< T >::Hashmap ( std::string  name,
size_t  max_size,
std::initializer_list< std::pair< uint64_t, T > >  list 
)
inline

Member Function Documentation

◆ Find() [1/2]

template<typename T >
T tram::Hashmap< T >::Find ( UID  key)
inline

◆ Find() [2/2]

template<typename T >
T tram::Hashmap< T >::Find ( uint64_t  key)
inline

◆ Insert() [1/2]

template<typename T >
void tram::Hashmap< T >::Insert ( UID  key,
value 
)
inline

◆ Insert() [2/2]

template<typename T >
void tram::Hashmap< T >::Insert ( uint64_t  key,
value 
)
inline

Member Data Documentation

◆ first

template<typename T >
PAIR* tram::Hashmap< T >::first = nullptr
protected

◆ last

template<typename T >
PAIR* tram::Hashmap< T >::last = nullptr
protected

◆ max_size

template<typename T >
size_t tram::Hashmap< T >::max_size = 0
protected

◆ name

template<typename T >
std::string tram::Hashmap< T >::name
protected

◆ padding

template<typename T >
const size_t tram::Hashmap< T >::padding = 10
protected

◆ size

template<typename T >
size_t tram::Hashmap< T >::size = 0
protected

The documentation for this class was generated from the following file: