Crossfire Server, Trunk
ArchetypeLoader Class Reference

#include <ArchetypeLoader.h>

+ Inheritance diagram for ArchetypeLoader:
+ Collaboration diagram for ArchetypeLoader:

Public Member Functions

 ArchetypeLoader (Archetypes *archetypes, AssetsTracker *tracker)
virtual void load (BufferReader *reader, const std::string &filename) override
virtual bool willLoad (const std::string &filename) override
- Public Member Functions inherited from AssetLoader
virtual ~AssetLoader ()

Private Attributes


Detailed Description

Definition at line 22 of file ArchetypeLoader.h.

Constructor & Destructor Documentation

◆ ArchetypeLoader()

ArchetypeLoader::ArchetypeLoader ( Archetypes archetypes,
AssetsTracker tracker 

Definition at line 20 of file ArchetypeLoader.cpp.

Member Function Documentation

◆ load()

void ArchetypeLoader::load ( BufferReader reader,
const std::string &  filename 

Load assets from the specified reader.

filenamefull filename.

Implements AssetLoader.

Definition at line 23 of file ArchetypeLoader.cpp.

References object::arch, AssetsTracker::assetDefined(), archetype::clone, AssetsCollection< T, Key >::define(), object::face, npc_dialog::filename, FLAG_MONSTER, get_archetype_struct(), object::head, archetype::head, LL_MORE, LL_NORMAL, load_object_from_reader(), m_archetypes, m_tracker, MAP_STYLE, object::more, archetype::name, QUERY_FLAG, SET_FLAG, object::speed_left, archetype::tail_x, archetype::tail_y, object::x, and object::y.

Referenced by ArchetypeWrapper::setRaw().

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

◆ willLoad()

virtual bool ArchetypeLoader::willLoad ( const std::string &  filename)

Whether this instance will process or not the specified file.

filenamefull file path.
true if processFile() should be called, false else.

Implements AssetLoader.

Definition at line 26 of file ArchetypeLoader.h.

References Utils::endsWith(), and npc_dialog::filename.

+ Here is the call graph for this function:

Field Documentation

◆ m_archetypes

Archetypes* ArchetypeLoader::m_archetypes

Definition at line 33 of file ArchetypeLoader.h.

Referenced by load().

◆ m_tracker

AssetsTracker* ArchetypeLoader::m_tracker

Definition at line 34 of file ArchetypeLoader.h.

Referenced by load().

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