Crossfire Server, Trunk
AllAnimations Class Reference

#include <Animations.h>

+ Inheritance diagram for AllAnimations:
+ Collaboration diagram for AllAnimations:

Public Member Functions

 AllAnimations ()
 
- Public Member Functions inherited from AssetsCollection< Animations >
void clear ()
 
size_t count () const
 
Animationsdefine (const std::string &name, Animations *asset)
 
void each (std::function< void(Animations *)> op)
 
Animationsfind (const std::string &name)
 
Animationsfirst (std::function< bool(const Animations *)> op)
 
Animationsget (const std::string &name)
 
std::vector< std::string > keys () const
 
Animationsnext (Animations *current)
 
const std::set< std::string > & undefined () const
 
virtual ~AssetsCollection ()
 

Protected Member Functions

virtual void added (Animations *anim) override
 
virtual void replace (Animations *existing, Animations *update) override
 

Additional Inherited Members

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

Detailed Description

Definition at line 19 of file Animations.h.

Constructor & Destructor Documentation

◆ AllAnimations()

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:

Member Function Documentation

◆ added()

void AllAnimations::added ( Animations )
overrideprotectedvirtual

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

Reimplemented from AssetsCollection< Animations >.

Definition at line 53 of file Animations.cpp.

References animate::anim, blank_face, and AssetsCollection< Animations >::m_assets.

◆ replace()

void AllAnimations::replace ( Animations existing,
Animations update 
)
overrideprotectedvirtual

Replace an asset by an updated version.

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

Implements AssetsCollection< Animations >.

Definition at line 37 of file Animations.cpp.

References blank_face, Animations::faces, Animations::facings, free_string(), Animations::has_blank, Animations::name, and Animations::num_animations.

+ Here is the call graph for this function:

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