Crossfire Server, Trunk
Facesets Class Reference

#include <Facesets.h>

+ Inheritance diagram for Facesets:
+ Collaboration diagram for Facesets:

Public Member Functions

face_setsfindById (int id)
 
- Public Member Functions inherited from AssetsCollection< face_sets >
void clear ()
 
size_t count () const
 
face_setsdefine (const std::string &name, face_sets *asset)
 
void each (std::function< void(face_sets *)> op)
 
face_setsfind (const std::string &name)
 
face_setsfirst (std::function< bool(const face_sets *)> op)
 
face_setsget (const std::string &name)
 
std::vector< std::string > keys () const
 
face_setsnext (face_sets *current)
 
const std::set< std::string > & undefined () const
 
virtual ~AssetsCollection ()
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Available facesets for clients.

Definition at line 23 of file Facesets.h.

Member Function Documentation

◆ added()

void Facesets::added ( face_sets )
overrideprotectedvirtual

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

Reimplemented from AssetsCollection< face_sets >.

Definition at line 61 of file Facesets.cpp.

References face_sets::id, and AssetsCollection< face_sets >::m_assets.

◆ findById()

face_sets * Facesets::findById ( int  id)

Attempt to find a faceset from its identifier.

Parameters
idfaceset identifier.
Returns
matching faceset, nullptr if no such faceset exists.

Definition at line 35 of file Facesets.cpp.

References is_valid_types_gen::found, and AssetsCollection< face_sets >::m_assets.

Referenced by find_faceset().

+ Here is the caller graph for this function:

◆ replace()

void Facesets::replace ( face_sets existing,
face_sets 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_sets >.

Definition at line 42 of file Facesets.cpp.

References face_sets::allocated, face_sets::comment, face_sets::extension, face_sets::faces, face_sets::fullname, face_sets::id, diamondslots::id, face_sets::prefix, and face_sets::size.


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