Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
NodeTimerList Class Reference

#include <nodetimer.h>

+ Collaboration diagram for NodeTimerList:

Public Member Functions

 NodeTimerList ()=default
 
 ~NodeTimerList ()=default
 
void serialize (std::ostream &os, u8 map_format_version) const
 
void deSerialize (std::istream &is, u8 map_format_version)
 
NodeTimer get (const v3s16 &p)
 
void remove (v3s16 p)
 
void insert (const NodeTimer &timer)
 
void set (const NodeTimer &timer)
 
void clear ()
 
std::vector< NodeTimerstep (float dtime)
 

Private Attributes

std::multimap< double, NodeTimerm_timers
 
std::map< v3s16, std::multimap< double, NodeTimer >::iterator > m_iterators
 
double m_next_trigger_time = -1.0
 
double m_time = 0.0
 

Constructor & Destructor Documentation

◆ NodeTimerList()

NodeTimerList::NodeTimerList ( )
default

◆ ~NodeTimerList()

NodeTimerList::~NodeTimerList ( )
default

Member Function Documentation

◆ clear()

void NodeTimerList::clear ( )
inline

References m_iterators, m_next_trigger_time, and m_timers.

Referenced by MapBlock::clearNodeTimers(), content_nodemeta_deserialize_legacy(), and deSerialize().

+ Here is the caller graph for this function:

◆ deSerialize()

void NodeTimerList::deSerialize ( std::istream & is,
u8 map_format_version )

References clear(), NodeTimer::deSerialize(), insert(), m_iterators, MAP_BLOCKSIZE, p(), readU16(), readU8(), NodeTimer::timeout, and warningstream.

Referenced by MapBlock::deSerialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

NodeTimer NodeTimerList::get ( const v3s16 & p)
inline

References NodeTimer::elapsed, m_iterators, m_time, p(), and NodeTimer::timeout.

Referenced by MapBlock::getNodeTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ insert()

void NodeTimerList::insert ( const NodeTimer & timer)
inline

References NodeTimer::elapsed, m_iterators, m_next_trigger_time, m_time, m_timers, p(), NodeTimer::position, and NodeTimer::timeout.

Referenced by deSerialize(), and set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void NodeTimerList::remove ( v3s16 p)
inline

References m_iterators, m_next_trigger_time, m_timers, and p().

Referenced by MapBlock::removeNodeTimer(), and set().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

void NodeTimerList::serialize ( std::ostream & os,
u8 map_format_version ) const

References m_time, m_timers, MAP_BLOCKSIZE, p(), NodeTimer::position, NodeTimer::serialize(), NodeTimer::timeout, writeU16(), and writeU8().

Referenced by MapBlock::serialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ set()

void NodeTimerList::set ( const NodeTimer & timer)
inline

References insert(), NodeTimer::position, and remove().

Referenced by content_nodemeta_deserialize_legacy(), and MapBlock::setNodeTimer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ step()

std::vector< NodeTimer > NodeTimerList::step ( float dtime)

References NodeTimer::elapsed, m_iterators, m_next_trigger_time, m_time, m_timers, NodeTimer::position, and NodeTimer::timeout.

Referenced by MapBlock::step().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_iterators

std::map<v3s16, std::multimap<double, NodeTimer>::iterator> NodeTimerList::m_iterators
private

◆ m_next_trigger_time

double NodeTimerList::m_next_trigger_time = -1.0
private

Referenced by clear(), insert(), remove(), and step().

◆ m_time

double NodeTimerList::m_time = 0.0
private

Referenced by get(), insert(), serialize(), and step().

◆ m_timers

std::multimap<double, NodeTimer> NodeTimerList::m_timers
private

Referenced by clear(), insert(), remove(), serialize(), and step().


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