Logo Search packages:      
Sourcecode: scummvm version File versions  Download package

template<class T>
static T* Common::Singleton< T >::makeInstance (  )  [inline, static, private]

The default object factory used by the template class Singleton. By specialising this template function, one can make a singleton use a custom object factory. For example, to support encapsulation, your singleton class might be pure virtual (or "abstract" in Java terminology), and you specialise makeInstance to return an instance of a subclass.

Definition at line 56 of file singleton.h.

            return new T();

Generated by  Doxygen 1.6.0   Back to index