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

Protected Member Functions

virtual void added (face_sets *face)
 
virtual face_setscreate (const std::string &prefix)
 
virtual void destroy (face_sets *item)
 
virtual void replace (face_sets *existing, face_sets *update)
 

Additional Inherited Members

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

Detailed Description

Available facesets for clients.

Definition at line 25 of file Facesets.h.

Member Function Documentation

◆ added()

void Facesets::added ( face_sets )
protectedvirtual

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.

◆ create()

face_sets * Facesets::create ( const std::string &  name)
protectedvirtual

Create a new asset.

Parameters
nameasset unique name.
Returns
asset.

Implements AssetsCollection< face_sets >.

Definition at line 26 of file Facesets.cpp.

References face_sets::prefix, castle_read::prefix, and strdup_local.

◆ destroy()

void Facesets::destroy ( face_sets item)
protectedvirtual

Destroy an asset.

Parameters
itemasset to destroy.

Implements AssetsCollection< face_sets >.

Definition at line 32 of file Facesets.cpp.

◆ 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 19 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 
)
protectedvirtual

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: