Crossfire Server, Trunk
Faces Class Reference

#include <Faces.h>

+ Inheritance diagram for Faces:
+ Collaboration diagram for Faces:

Public Member Functions

int checksum () const
 
 Faces ()
 
const FacefindById (uint16_t id)
 
- Public Member Functions inherited from AssetsCollection< Face >
void clear ()
 
size_t count () const
 
Facedefine (const std::string &name, Face *asset)
 
void each (std::function< void(Face *)> op)
 
Facefind (const std::string &name)
 
Facefirst (std::function< bool(const Face *)> op)
 
Faceget (const std::string &name)
 
std::vector< std::string > keys () const
 
Facenext (Face *current)
 
const std::set< std::string > & undefined () const
 
virtual ~AssetsCollection ()
 

Protected Member Functions

virtual void added (Face *face) override
 
virtual void replace (Face *existing, Face *update) override
 

Protected Attributes

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

Detailed Description

Definition at line 19 of file Faces.h.

Constructor & Destructor Documentation

◆ Faces()

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:

Member Function Documentation

◆ added()

void Faces::added ( Face )
overrideprotectedvirtual

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

Reimplemented from AssetsCollection< Face >.

Definition at line 51 of file Faces.cpp.

References banquet::l, AssetsCollection< Face >::m_assets, m_checksum, Face::name, Face::number, and ROTATE_RIGHT.

◆ checksum()

int Faces::checksum ( ) const
inline

Definition at line 25 of file Faces.h.

References m_checksum.

◆ findById()

const Face * Faces::findById ( uint16_t  id)

Definition at line 44 of file Faces.cpp.

References AssetsCollection< Face >::m_assets.

Referenced by get_face_by_id().

+ Here is the caller graph for this function:

◆ replace()

void Faces::replace ( Face existing,
Face 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< 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:

Field Documentation

◆ m_checksum

int Faces::m_checksum
protected

Definition at line 28 of file Faces.h.

Referenced by added(), and checksum().


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