WoW Model Viewer
Your premiere tool for viewing, equipping and animating World of Warcraft models.
Loading...
Searching...
No Matches
Manager< IDTYPE > Class Template Referenceabstract

Generic name-to-ID resource manager with reference-counted items. More...

#include <manager.h>

Public Member Functions

 Manager ()=default
 
 ~Manager ()
 
virtual IDTYPE add (GameFile *)=0
 
virtual void del (IDTYPE id)
 
void delbyname (const std::string &name)
 
virtual void doDelete (IDTYPE)
 
bool has (const std::string &name)
 
IDTYPE get (const std::string &name)
 
std::string get (IDTYPE id)
 
void clear ()
 
void dump ()
 

Public Attributes

std::map< std::string, IDTYPE > names
 
std::map< IDTYPE, ManagedItem * > items
 

Protected Member Functions

void do_add (const std::string &name, IDTYPE id, ManagedItem *item)
 

Detailed Description

template<class IDTYPE>
class Manager< IDTYPE >

Generic name-to-ID resource manager with reference-counted items.

Template Parameters
IDTYPEThe numeric ID type used to identify managed items (e.g. GLuint).

Definition at line 46 of file manager.h.

Constructor & Destructor Documentation

◆ Manager()

template<class IDTYPE >
Manager< IDTYPE >::Manager ( )
default

◆ ~Manager()

template<class IDTYPE >
Manager< IDTYPE >::~Manager ( )
inline

Definition at line 54 of file manager.h.

Member Function Documentation

◆ add()

template<class IDTYPE >
virtual IDTYPE Manager< IDTYPE >::add ( GameFile )
pure virtual

Implemented in ModelManager, and TextureManager.

◆ clear()

template<class IDTYPE >
void Manager< IDTYPE >::clear ( )
inline

Definition at line 128 of file manager.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ del()

template<class IDTYPE >
virtual void Manager< IDTYPE >::del ( IDTYPE  id)
inlinevirtual

Definition at line 62 of file manager.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ delbyname()

template<class IDTYPE >
void Manager< IDTYPE >::delbyname ( const std::string &  name)
inline

Definition at line 90 of file manager.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ do_add()

template<class IDTYPE >
void Manager< IDTYPE >::do_add ( const std::string &  name,
IDTYPE  id,
ManagedItem item 
)
inlineprotected

Definition at line 149 of file manager.h.

Here is the call graph for this function:

◆ doDelete()

template<class IDTYPE >
virtual void Manager< IDTYPE >::doDelete ( IDTYPE  )
inlinevirtual

Reimplemented in TextureManager.

Definition at line 96 of file manager.h.

Here is the caller graph for this function:

◆ dump()

template<class IDTYPE >
void Manager< IDTYPE >::dump ( )
inline

Definition at line 142 of file manager.h.

Here is the caller graph for this function:

◆ get() [1/2]

template<class IDTYPE >
IDTYPE Manager< IDTYPE >::get ( const std::string &  name)
inline

Definition at line 105 of file manager.h.

Here is the caller graph for this function:

◆ get() [2/2]

template<class IDTYPE >
std::string Manager< IDTYPE >::get ( IDTYPE  id)
inline

Definition at line 114 of file manager.h.

◆ has()

template<class IDTYPE >
bool Manager< IDTYPE >::has ( const std::string &  name)
inline

Definition at line 100 of file manager.h.

Here is the caller graph for this function:

Member Data Documentation

◆ items

template<class IDTYPE >
std::map<IDTYPE, ManagedItem*> Manager< IDTYPE >::items

Definition at line 50 of file manager.h.

◆ names

template<class IDTYPE >
std::map<std::string, IDTYPE> Manager< IDTYPE >::names

Definition at line 49 of file manager.h.


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