aether::netcode::entity_store< Entity > Class Template Reference

#include <entity_store.hh>

Classes

struct  metadata_type
 

Public Types

using time_point = std::chrono::steady_clock::time_point
 
using entity_type = Entity
 
using entity_handle = detail::entity_handle
 

Public Member Functions

 entity_store ()=default
 
std::optional< entity_handlefind_entity (const uint64_t entity_id) const
 
uint64_t get_entity_id (const entity_handle &handle) const
 
entity_handle new_entity (const metadata_type &metadata, const uint64_t entity_id, const entity_type &entity)
 
void update_entity (const metadata_type &metadata, const entity_handle &handle, const entity_type &entity)
 
const entity_typeget (const entity_handle &handle) const
 
void drop (const entity_handle &handle)
 
bool is_valid (const entity_handle &handle) const
 
time_point last_updated_time (const entity_handle &handle) const
 
uint64_t last_updated_tick (const entity_handle &handle) const
 
uint64_t last_worker (const entity_handle &handle) const
 
std::vector< entity_handleget_older_than (const uint64_t tick) const
 
std::optional< entity_handlefirst () const
 
std::optional< entity_handlenext (const entity_handle &handle) const
 

Member Typedef Documentation

template<typename Entity>
using aether::netcode::entity_store< Entity >::entity_handle = detail::entity_handle
template<typename Entity>
using aether::netcode::entity_store< Entity >::entity_type = Entity
template<typename Entity>
using aether::netcode::entity_store< Entity >::time_point = std::chrono::steady_clock::time_point

Constructor & Destructor Documentation

template<typename Entity>
aether::netcode::entity_store< Entity >::entity_store ( )
default

Member Function Documentation

template<typename Entity>
void aether::netcode::entity_store< Entity >::drop ( const entity_handle handle)
inline
template<typename Entity>
std::optional<entity_handle> aether::netcode::entity_store< Entity >::find_entity ( const uint64_t  entity_id) const
inline
template<typename Entity>
std::optional<entity_handle> aether::netcode::entity_store< Entity >::first ( ) const
inline
template<typename Entity>
const entity_type& aether::netcode::entity_store< Entity >::get ( const entity_handle handle) const
inline
template<typename Entity>
uint64_t aether::netcode::entity_store< Entity >::get_entity_id ( const entity_handle handle) const
inline
template<typename Entity>
std::vector<entity_handle> aether::netcode::entity_store< Entity >::get_older_than ( const uint64_t  tick) const
inline
template<typename Entity>
bool aether::netcode::entity_store< Entity >::is_valid ( const entity_handle handle) const
inline
template<typename Entity>
uint64_t aether::netcode::entity_store< Entity >::last_updated_tick ( const entity_handle handle) const
inline
template<typename Entity>
time_point aether::netcode::entity_store< Entity >::last_updated_time ( const entity_handle handle) const
inline
template<typename Entity>
uint64_t aether::netcode::entity_store< Entity >::last_worker ( const entity_handle handle) const
inline
template<typename Entity>
entity_handle aether::netcode::entity_store< Entity >::new_entity ( const metadata_type metadata,
const uint64_t  entity_id,
const entity_type entity 
)
inline
template<typename Entity>
std::optional<entity_handle> aether::netcode::entity_store< Entity >::next ( const entity_handle handle) const
inline
template<typename Entity>
void aether::netcode::entity_store< Entity >::update_entity ( const metadata_type metadata,
const entity_handle handle,
const entity_type entity 
)
inline