Luanti 5.10.0-dev
 
Loading...
Searching...
No Matches
NodeResolver Class Referenceabstract

#include <nodedef.h>

+ Inheritance diagram for NodeResolver:
+ Collaboration diagram for NodeResolver:

Public Member Functions

 NodeResolver ()
 
virtual ~NodeResolver ()
 
virtual void resolveNodeNames ()=0
 
void cloneTo (NodeResolver *res) const
 
bool getIdFromNrBacklog (content_t *result_out, const std::string &node_alt, content_t c_fallback, bool error_on_fallback=true)
 
bool getIdsFromNrBacklog (std::vector< content_t > *result_out, bool all_required=false, content_t c_fallback=CONTENT_IGNORE)
 
bool isResolveDone () const
 
void reset (bool resolve_done=false)
 

Public Attributes

std::vector< std::string > m_nodenames
 
std::vector< size_t > m_nnlistsizes
 

Protected Attributes

const NodeDefManagerm_ndef = nullptr
 
u32 m_nodenames_idx = 0
 

Private Member Functions

void nodeResolveInternal ()
 

Private Attributes

u32 m_nnlistsizes_idx = 0
 
bool m_resolve_done = false
 

Friends

class NodeDefManager
 

Constructor & Destructor Documentation

◆ NodeResolver()

NodeResolver::NodeResolver ( )

References reset().

+ Here is the call graph for this function:

◆ ~NodeResolver()

NodeResolver::~NodeResolver ( )
virtual

References NodeDefManager::cancelNodeResolveCallback(), m_ndef, and m_resolve_done.

+ Here is the call graph for this function:

Member Function Documentation

◆ cloneTo()

void NodeResolver::cloneTo ( NodeResolver * res) const

References FATAL_ERROR_IF, m_ndef, and m_resolve_done.

Referenced by Biome::clone(), DecoSchematic::clone(), Schematic::clone(), and Ore::cloneTo().

+ Here is the caller graph for this function:

◆ getIdFromNrBacklog()

bool NodeResolver::getIdFromNrBacklog ( content_t * result_out,
const std::string & node_alt,
content_t c_fallback,
bool error_on_fallback = true )

References errorstream, NodeDefManager::getId(), m_ndef, m_nodenames, and m_nodenames_idx.

Referenced by Biome::resolveNodeNames(), Foobar::resolveNodeNames(), Foobaz::resolveNodeNames(), Ore::resolveNodeNames(), and treegen::TreeDef::resolveNodeNames().

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

◆ getIdsFromNrBacklog()

bool NodeResolver::getIdsFromNrBacklog ( std::vector< content_t > * result_out,
bool all_required = false,
content_t c_fallback = CONTENT_IGNORE )

References errorstream, NodeDefManager::getId(), NodeDefManager::getIds(), m_ndef, m_nnlistsizes, m_nnlistsizes_idx, m_nodenames, m_nodenames_idx, and str_starts_with().

Referenced by Biome::resolveNodeNames(), Decoration::resolveNodeNames(), DecoSimple::resolveNodeNames(), Foobar::resolveNodeNames(), Ore::resolveNodeNames(), and Schematic::resolveNodeNames().

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

◆ isResolveDone()

bool NodeResolver::isResolveDone ( ) const
inline

References m_resolve_done.

Referenced by ModApiMapgen::l_read_schematic(), Schematic::saveSchematicToFile(), and Schematic::serializeToLua().

+ Here is the caller graph for this function:

◆ nodeResolveInternal()

void NodeResolver::nodeResolveInternal ( )
private

References m_nnlistsizes, m_nnlistsizes_idx, m_nodenames, m_nodenames_idx, m_resolve_done, and resolveNodeNames().

Referenced by NodeDefManager::pendNodeResolve(), and NodeDefManager::runNodeResolveCallbacks().

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

◆ reset()

void NodeResolver::reset ( bool resolve_done = false)

References m_nnlistsizes, m_nnlistsizes_idx, m_nodenames, m_nodenames_idx, and m_resolve_done.

Referenced by NodeResolver(), Schematic::condenseContentIds(), Schematic::deserializeFromMts(), and Schematic::getSchematicFromMap().

+ Here is the caller graph for this function:

◆ resolveNodeNames()

virtual void NodeResolver::resolveNodeNames ( )
pure virtual

Implemented in Biome, Decoration, DecoSimple, Foobar, Foobaz, Ore, Schematic, and treegen::TreeDef.

Referenced by nodeResolveInternal().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ NodeDefManager

friend class NodeDefManager
friend

Member Data Documentation

◆ m_ndef

◆ m_nnlistsizes

◆ m_nnlistsizes_idx

u32 NodeResolver::m_nnlistsizes_idx = 0
private

◆ m_nodenames

◆ m_nodenames_idx

u32 NodeResolver::m_nodenames_idx = 0
protected

◆ m_resolve_done

bool NodeResolver::m_resolve_done = false
private

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