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

Archetypesm_archetypes
 
AssetsTrackerm_tracker
 

Detailed Description

Definition at line 22 of file ArchetypeLoader.h.

Constructor & Destructor Documentation

◆ ArchetypeLoader()

ArchetypeLoader::ArchetypeLoader ( Archetypes archetypes,
AssetsTracker tracker 
)

Definition at line 24 of file ArchetypeLoader.cpp.

Member Function Documentation

◆ load()

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

Load assets from the specified reader. Must be implemented.

Parameters
readerreader.
filenamefull filename.

Implements AssetLoader.

Definition at line 27 of file ArchetypeLoader.cpp.

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

Referenced by CREArchetypePanel::commitData().

+ 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)
inlineoverridevirtual

Whether this instance will process or not the specified file.

Parameters
filenamefull file path.
Returns
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
private

Definition at line 33 of file ArchetypeLoader.h.

Referenced by load().

◆ m_tracker

AssetsTracker* ArchetypeLoader::m_tracker
private

Definition at line 34 of file ArchetypeLoader.h.

Referenced by load().


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