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

#include <staticobject.h>

+ Collaboration diagram for StaticObjectList:

Public Member Functions

void insert (u16 id, const StaticObject &obj)
 
void remove (u16 id)
 
void serialize (std::ostream &os)
 
void deSerialize (std::istream &is)
 
const std::vector< StaticObject > & getAllStored () const
 
const std::map< u16, StaticObject > & getAllActives () const
 
void setActive (u16 id, const StaticObject &obj)
 
size_t getActiveSize () const
 
size_t getStoredSize () const
 
void clearStored ()
 
void pushStored (const StaticObject &obj)
 
bool storeActiveObject (u16 id)
 
void clear ()
 
size_t size ()
 

Private Attributes

std::vector< StaticObjectm_stored
 
std::map< u16, StaticObjectm_active
 

Member Function Documentation

◆ clear()

void StaticObjectList::clear ( )
inline

References m_active, and m_stored.

Referenced by MapBlock::clearObjects().

+ Here is the caller graph for this function:

◆ clearStored()

void StaticObjectList::clearStored ( )
inline

References m_stored.

Referenced by ServerEnvironment::activateBlock(), ServerEnvironment::activateObjects(), and MapBlock::onObjectsActivation().

+ Here is the caller graph for this function:

◆ deSerialize()

void StaticObjectList::deSerialize ( std::istream & is)

References StaticObject::deSerialize(), errorstream, m_active, m_stored, readU16(), and readU8().

Referenced by MapBlock::deSerialize(), and MapBlock::deSerialize_pre22().

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

◆ getActiveSize()

size_t StaticObjectList::getActiveSize ( ) const
inline

References m_active.

Referenced by ABMHandler::countObjects().

+ Here is the caller graph for this function:

◆ getAllActives()

const std::map< u16, StaticObject > & StaticObjectList::getAllActives ( ) const
inline

References m_active.

Referenced by ServerEnvironment::setStaticForActiveObjectsInBlock().

+ Here is the caller graph for this function:

◆ getAllStored()

const std::vector< StaticObject > & StaticObjectList::getAllStored ( ) const
inline

References m_stored.

Referenced by ServerEnvironment::activateObjects(), and MapBlock::onObjectsActivation().

+ Here is the caller graph for this function:

◆ getStoredSize()

size_t StaticObjectList::getStoredSize ( ) const
inline

References m_stored.

Referenced by MapBlock::onObjectsActivation(), and MapBlock::saveStaticObject().

+ Here is the caller graph for this function:

◆ insert()

void StaticObjectList::insert ( u16 id,
const StaticObject & obj )
inline

References dstream, FATAL_ERROR, m_active, m_stored, and setActive().

Referenced by MapBlock::saveStaticObject().

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

◆ pushStored()

void StaticObjectList::pushStored ( const StaticObject & obj)
inline

References m_stored.

Referenced by ServerEnvironment::activateObjects().

+ Here is the caller graph for this function:

◆ remove()

void StaticObjectList::remove ( u16 id)
inline

References m_active, and warningstream.

Referenced by ServerEnvironment::deleteStaticFromBlock().

+ Here is the caller graph for this function:

◆ serialize()

void StaticObjectList::serialize ( std::ostream & os)

References errorstream, m_active, m_stored, StaticObject::serialize(), U16_MAX, writeU16(), and writeU8().

Referenced by MapBlock::serialize().

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

◆ setActive()

void StaticObjectList::setActive ( u16 id,
const StaticObject & obj )
inline

References m_active.

Referenced by ServerEnvironment::addActiveObjectRaw(), and insert().

+ Here is the caller graph for this function:

◆ size()

size_t StaticObjectList::size ( )
inline

References m_active, and m_stored.

Referenced by MapBlock::clearObjects(), and ABMHandler::countObjects().

+ Here is the caller graph for this function:

◆ storeActiveObject()

bool StaticObjectList::storeActiveObject ( u16 id)

References m_active, and m_stored.

Referenced by MapBlock::storeActiveObject().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_active

std::map<u16, StaticObject> StaticObjectList::m_active
private

◆ m_stored

std::vector<StaticObject> StaticObjectList::m_stored
private

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