Symphony Of Empires
Manager< K, V > Class Template Reference

#include <manager.hpp>

Public Member Functions

virtual std::shared_ptr< V > load (const K &key)
 Load an element, this is the function that must be defined by the inheritor. More...
 
virtual const T & get (const K &key)
 Obtain an element or construct a new one from a provided construct which accepts key. More...
 

Static Public Member Functions

static Manager< K, V > & get_instance ()
 Return the singleton. More...
 

Static Public Attributes

static Manager< K, V > * singleton
 Global manager object. More...
 

Detailed Description

template<typename K, typename V>
class Manager< K, V >

Definition at line 33 of file manager.hpp.

Member Function Documentation

◆ get()

template<typename K , typename V >
virtual const T& Manager< K, V >::get ( const K &  key)
inlinevirtual

Obtain an element or construct a new one from a provided construct which accepts key.

Definition at line 49 of file manager.hpp.

Here is the call graph for this function:

◆ get_instance()

template<typename K , typename V >
static Manager<K, V>& Manager< K, V >::get_instance ( )
inlinestatic

Return the singleton.

Definition at line 40 of file manager.hpp.

◆ load()

template<typename K , typename V >
virtual std::shared_ptr<V> Manager< K, V >::load ( const K &  key)
inlinevirtual

Load an element, this is the function that must be defined by the inheritor.

Definition at line 45 of file manager.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ singleton

template<typename K , typename V >
Manager<K, V>* Manager< K, V >::singleton
static

Global manager object.

Definition at line 37 of file manager.hpp.


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