![]() |
Crossfire Server, Trunk
1.75.0
|
#include <Animations.h>
Inheritance diagram for AllAnimations:
Collaboration diagram for AllAnimations:Public Member Functions | |
| AllAnimations () | |
Public Member Functions inherited from AssetsCollection< Animations > | |
| void | clear () |
| Clear all assets. More... | |
| size_t | count () const |
| Get the number of assets. More... | |
| Animations * | define (const std::string &name, Animations *asset) |
| Define an asset, erasing an existing one. More... | |
| void | each (std::function< void(Animations *)> op) |
| Apply a function to each asset. More... | |
| Animations * | find (const std::string &name) |
| Get a named asset if it exists. More... | |
| Animations * | first (std::function< bool(const Animations *)> op) |
| Find the first asset matching some condition. More... | |
| Animations * | get (const std::string &name) |
| Get a named asset. More... | |
| std::vector< std::string > | keys () const |
| Get the names of all defined assets. More... | |
| Animations * | next (Animations *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 (Animations *anim) override |
| An asset was either referenced (but undefined) or defined. More... | |
| virtual void | replace (Animations *existing, Animations *update) override |
| Replace an asset by an updated version. More... | |
Additional Inherited Members | |
Protected Attributes inherited from AssetsCollection< Animations > | |
| std::unordered_map< std::string, Animations * > | m_assets |
| Known assets. More... | |
| std::set< std::string > | m_undefined |
| List of undefined assets. More... | |
Definition at line 19 of file Animations.h.
| AllAnimations::AllAnimations | ( | ) |
Definition at line 32 of file Animations.cpp.
References AssetsCollection< Animations >::get(), and AssetsCollection< Animations >::m_undefined.
Here is the call graph for this function:
|
overrideprotectedvirtual |
An asset was either referenced (but undefined) or defined.
Reimplemented from AssetsCollection< Animations >.
Definition at line 53 of file Animations.cpp.
References blank_face, face(), Animations::faces, Animations::has_blank, AssetsCollection< Animations >::m_assets, Animations::num, and Animations::num_animations.
Here is the call graph for this function:
|
overrideprotectedvirtual |
Replace an asset by an updated version.
| existing | asset to be updated. |
| update | new version of the asset, which must be destroyed. |
Implements AssetsCollection< Animations >.
Definition at line 37 of file Animations.cpp.
References blank_face, face(), Animations::faces, Animations::facings, free_string(), Animations::has_blank, Animations::name, and Animations::num_animations.
Here is the call graph for this function: