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)
quest_definitionnext (quest_definition *current)
const std::set< std::string > & undefined () const

Protected Member Functions

virtual void added (quest_definition *quest)
virtual quest_definitioncreate (const std::string &name)
virtual void destroy (quest_definition *item)
virtual void replace (quest_definition *existing, quest_definition *update)

Private Attributes

size_t visibleQuests

Additional Inherited Members

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

Detailed Description

Definition at line 21 of file Quests.h.

Constructor & Destructor Documentation

◆ Quests()

Quests::Quests ( )

Definition at line 15 of file Quests.cpp.

◆ ~Quests()

Quests::~Quests ( )

Definition at line 18 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 41 of file Quests.cpp.

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

◆ create()

quest_definition * Quests::create ( const std::string &  name)

Create a new asset.

nameasset unique name.

Implements AssetsCollection< quest_definition >.

Definition at line 21 of file Quests.cpp.

References give::name, and quest_create().

+ Here is the call graph for this function:

◆ destroy()

void Quests::destroy ( quest_definition item)

Destroy an asset.

itemasset to destroy.

Implements AssetsCollection< quest_definition >.

Definition at line 25 of file Quests.cpp.

References quest_destroy().

+ Here is the call graph for this function:

◆ 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 29 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 26 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 35 of file Quests.h.

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

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