![]() |
Crossfire Server, Trunk
1.75.0
|
#include <Faces.h>
Inheritance diagram for Faces:
Collaboration diagram for Faces:Public Member Functions | |
| int | checksum () const |
| Faces () | |
| const Face * | findById (uint16_t id) |
Public Member Functions inherited from AssetsCollection< Face > | |
| void | clear () |
| Clear all assets. More... | |
| size_t | count () const |
| Get the number of assets. More... | |
| Face * | define (const std::string &name, Face *asset) |
| Define an asset, erasing an existing one. More... | |
| void | each (std::function< void(Face *)> op) |
| Apply a function to each asset. More... | |
| Face * | find (const std::string &name) |
| Get a named asset if it exists. More... | |
| Face * | first (std::function< bool(const Face *)> op) |
| Find the first asset matching some condition. More... | |
| Face * | get (const std::string &name) |
| Get a named asset. More... | |
| std::vector< std::string > | keys () const |
| Get the names of all defined assets. More... | |
| Face * | next (Face *current) |
| Allow browsing assets in a list-like manner. More... | |
| const std::set< std::string > & | undefined () const |
| Return the list of undefined assets, that is assets requested through get() but not defined through define(). More... | |
| virtual | ~AssetsCollection () |
| Destroy this instance and all assets it owns. More... | |
Protected Member Functions | |
| virtual void | added (Face *face) override |
| An asset was either referenced (but undefined) or defined. More... | |
| virtual void | replace (Face *existing, Face *update) override |
| Replace an asset by an updated version. More... | |
Protected Attributes | |
| int | m_checksum |
Protected Attributes inherited from AssetsCollection< Face > | |
| std::unordered_map< std::string, Face * > | m_assets |
| Known assets. More... | |
| std::set< std::string > | m_undefined |
| List of undefined assets. More... | |
| Faces::Faces | ( | ) |
Definition at line 29 of file Faces.cpp.
References blank_face, BLANK_FACE_NAME, empty_face, EMPTY_FACE_NAME, AssetsCollection< Face >::get(), smooth_face, and SMOOTH_FACE_NAME.
Here is the call graph for this function:
|
overrideprotectedvirtual |
An asset was either referenced (but undefined) or defined.
Reimplemented from AssetsCollection< Face >.
Definition at line 51 of file Faces.cpp.
References face(), AssetsCollection< Face >::m_assets, m_checksum, treasurelist::name, and ROTATE_RIGHT.
Here is the call graph for this function:
|
inline |
Definition at line 25 of file Faces.h.
References m_checksum.
| const Face * Faces::findById | ( | uint16_t | id | ) |
Definition at line 44 of file Faces.cpp.
References face(), and AssetsCollection< Face >::m_assets.
Referenced by get_face_by_id().
Here is the call graph for this function:
Here is the caller graph for this function:Replace an asset by an updated version.
| existing | asset to be updated. |
| update | new version of the asset, which must be destroyed. |
Implements AssetsCollection< Face >.
Definition at line 35 of file Faces.cpp.
References asset_destroy(), Face::magicmap, Face::smoothface, and Face::visibility.
Here is the call graph for this function:
|
protected |
Definition at line 28 of file Faces.h.
Referenced by added(), and checksum().