Crossfire Server, Trunk
Quests Class Reference

#include <Quests.h>

+ Inheritance diagram for Quests:
+ Collaboration diagram for Quests:

Public Member Functions

 Quests ()
size_t visibleCount () const
virtual ~Quests ()
- Public Member Functions inherited from AssetsCollection< quest_definition >
void clear ()
size_t count () const
quest_definitiondefine (const std::string &name, quest_definition *asset)
void each (std::function< void(quest_definition *)> op)
quest_definitionfind (const std::string &name)
quest_definitionfirst (std::function< bool(const quest_definition *)> op)
quest_definitionget (const std::string &name)
std::vector< std::string > keys () const
quest_definitionnext (quest_definition *current)
const std::set< std::string > & undefined () const
virtual ~AssetsCollection ()

Protected Member Functions

virtual void added (quest_definition *quest) override
virtual void replace (quest_definition *existing, quest_definition *update) override

Private Attributes

size_t visibleQuests

Additional Inherited Members

- Protected Attributes inherited from AssetsCollection< quest_definition >
std::unordered_map< std::string, quest_definition * > m_assets
std::set< std::string > m_undefined

Detailed Description

Definition at line 19 of file Quests.h.

Constructor & Destructor Documentation

◆ Quests()

Quests::Quests ( )

Definition at line 25 of file Quests.cpp.

◆ ~Quests()

Quests::~Quests ( )

Definition at line 28 of file Quests.cpp.

Member Function Documentation

◆ added()

void Quests::added ( quest_definition )

An asset was either referenced (but undefined) or defined.

Reimplemented from AssetsCollection< quest_definition >.

Definition at line 43 of file Quests.cpp.

References AssetsCollection< quest_definition >::m_assets, and visibleQuests.

◆ replace()

void Quests::replace ( quest_definition existing,
quest_definition update 

Replace an asset by an updated version.

existingasset to be updated.
updatenew version of the asset, which must be destroyed.

Implements AssetsCollection< quest_definition >.

Definition at line 31 of file Quests.cpp.

References quest_clear(), quest_definition::quest_is_system, and visibleQuests.

+ Here is the call graph for this function:

◆ visibleCount()

size_t Quests::visibleCount ( ) const

Definition at line 24 of file Quests.h.

References visibleQuests.

Referenced by quests_count().

+ Here is the caller graph for this function:

Field Documentation

◆ visibleQuests

size_t Quests::visibleQuests

Definition at line 31 of file Quests.h.

Referenced by added(), replace(), and visibleCount().

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