#include <nodetimer.h>
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< NodeTimer > | step (float dtime) |
Private Attributes | |
std::multimap< double, NodeTimer > | m_timers |
std::map< v3s16, std::multimap< double, NodeTimer >::iterator > | m_iterators |
double | m_next_trigger_time = -1.0 |
double | m_time = 0.0 |
|
default |
|
default |
|
inline |
References m_iterators, m_next_trigger_time, and m_timers.
Referenced by MapBlock::clearNodeTimers(), content_nodemeta_deserialize_legacy(), and 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().
References NodeTimer::elapsed, m_iterators, m_time, p(), and NodeTimer::timeout.
Referenced by MapBlock::getNodeTimer().
|
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().
|
inline |
References m_iterators, m_next_trigger_time, m_timers, and p().
Referenced by MapBlock::removeNodeTimer(), and set().
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().
|
inline |
References insert(), NodeTimer::position, and remove().
Referenced by content_nodemeta_deserialize_legacy(), and MapBlock::setNodeTimer().
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().
|
private |
|
private |
Referenced by get(), insert(), serialize(), and step().
|
private |
Referenced by clear(), insert(), remove(), serialize(), and step().