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

Protected Member Functions

virtual void added (Animations *anim)
 
virtual Animationscreate (const std::string &name)
 
virtual void destroy (Animations *item)
 
virtual void replace (Animations *existing, Animations *update)
 

Additional Inherited Members

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

Detailed Description

Definition at line 22 of file Animations.h.

Constructor & Destructor Documentation

◆ AllAnimations()

AllAnimations::AllAnimations ( )

Definition at line 19 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 )
protectedvirtual

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

Reimplemented from AssetsCollection< Animations >.

Definition at line 46 of file Animations.cpp.

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

◆ create()

Animations * AllAnimations::create ( const std::string &  name)
protectedvirtual

Create a new asset.

Parameters
nameasset unique name.
Returns
asset.

Implements AssetsCollection< Animations >.

Definition at line 24 of file Animations.cpp.

References add_string(), animate::anim, and give::name.

+ Here is the call graph for this function:

◆ destroy()

void AllAnimations::destroy ( Animations item)
protectedvirtual

Destroy an asset.

Parameters
itemasset to destroy.

Implements AssetsCollection< Animations >.

Definition at line 31 of file Animations.cpp.

References free_string().

+ Here is the call graph for this function:

◆ replace()

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

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 36 of file Animations.cpp.

References animations_struct::faces, animations_struct::facings, free_string(), animations_struct::name, and animations_struct::num_animations.

+ Here is the call graph for this function:

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