Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
NodeMetadataList Class Reference

#include <nodemetadata.h>

+ Collaboration diagram for NodeMetadataList:

Public Member Functions

 NodeMetadataList (bool is_metadata_owner=true)
 
 ~NodeMetadataList ()
 
void serialize (std::ostream &os, u8 blockver, bool disk=true, bool absolute_pos=false, bool include_empty=false) const
 
void deSerialize (std::istream &is, IItemDefManager *item_def_mgr, bool absolute_pos=false)
 
std::vector< v3s16getAllKeys ()
 
NodeMetadataget (v3s16 p)
 
void remove (v3s16 p)
 
void set (v3s16 p, NodeMetadata *d)
 
void clear ()
 
size_t size () const
 
NodeMetadataMap::const_iterator begin ()
 
NodeMetadataMap::const_iterator end ()
 

Private Member Functions

int countNonEmpty () const
 

Private Attributes

bool m_is_metadata_owner
 
NodeMetadataMap m_data
 

Constructor & Destructor Documentation

◆ NodeMetadataList()

NodeMetadataList::NodeMetadataList ( bool is_metadata_owner = true)
inline

◆ ~NodeMetadataList()

NodeMetadataList::~NodeMetadataList ( )

References clear().

+ Here is the call graph for this function:

Member Function Documentation

◆ begin()

NodeMetadataMap::const_iterator NodeMetadataList::begin ( )
inline

References m_data.

Referenced by Client::handleCommand_NodemetaChanged().

+ Here is the caller graph for this function:

◆ clear()

void NodeMetadataList::clear ( )

References m_data, and m_is_metadata_owner.

Referenced by ~NodeMetadataList(), content_nodemeta_deserialize_legacy(), deSerialize(), and Server::sendMetadataChanged().

+ Here is the caller graph for this function:

◆ countNonEmpty()

int NodeMetadataList::countNonEmpty ( ) const
private

References m_data.

Referenced by serialize().

+ Here is the caller graph for this function:

◆ deSerialize()

void NodeMetadataList::deSerialize ( std::istream & is,
IItemDefManager * item_def_mgr,
bool absolute_pos = false )

References clear(), NodeMetadata::deSerialize(), FUNCTION_NAME, infostream, itos(), m_data, MAP_BLOCKSIZE, p(), readS16(), readU16(), readU8(), and warningstream.

Referenced by MapBlock::deSerialize(), and Client::handleCommand_NodemetaChanged().

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

◆ end()

NodeMetadataMap::const_iterator NodeMetadataList::end ( )
inline

References m_data.

Referenced by Client::handleCommand_NodemetaChanged().

+ Here is the caller graph for this function:

◆ get()

NodeMetadata * NodeMetadataList::get ( v3s16 p)

References m_data, and p().

Referenced by content_nodemeta_deserialize_legacy(), Map::getNodeMetadata(), and remove().

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

◆ getAllKeys()

std::vector< v3s16 > NodeMetadataList::getAllKeys ( )

References m_data.

Referenced by Map::findNodesWithMetadata().

+ Here is the caller graph for this function:

◆ remove()

void NodeMetadataList::remove ( v3s16 p)

References NodeMetadata::clear(), get(), m_data, m_is_metadata_owner, and p().

Referenced by Map::removeNodeMetadata(), and set().

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

◆ serialize()

void NodeMetadataList::serialize ( std::ostream & os,
u8 blockver,
bool disk = true,
bool absolute_pos = false,
bool include_empty = false ) const

References countNonEmpty(), NodeMetadata::empty(), m_data, MAP_BLOCKSIZE, p(), NodeMetadata::serialize(), U16_MAX, writeS16(), writeU16(), and writeU8().

Referenced by Server::sendMetadataChanged(), and MapBlock::serialize().

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

◆ set()

void NodeMetadataList::set ( v3s16 p,
NodeMetadata * d )

References m_data, p(), and remove().

Referenced by content_nodemeta_deserialize_legacy(), Server::sendMetadataChanged(), and Map::setNodeMetadata().

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

◆ size()

size_t NodeMetadataList::size ( ) const
inline

References m_data.

Referenced by Server::sendMetadataChanged().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_data

NodeMetadataMap NodeMetadataList::m_data
private

◆ m_is_metadata_owner

bool NodeMetadataList::m_is_metadata_owner
private

Referenced by clear(), and remove().


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