paludis  Version 2.6.0
Friends | List of all members
paludis::Singleton< OurType_ > Class Template Reference

#include <singleton.hh>

+ Inheritance diagram for paludis::Singleton< OurType_ >:


class DeleteOnDestruction

Basic operations

 Singleton ()=default
 Singleton (const Singleton &)=delete
const Singletonoperator= (const Singleton &)=delete

Singleton operations

static OurType_ * get_instance () PALUDIS_ATTRIBUTE((warn_unused_result))
static void destroy_instance ()

Detailed Description

template<typename OurType_>
class paludis::Singleton< OurType_ >

Singletons have a single instance and are created when first used.

Member Function Documentation

template<typename OurType_>
static void paludis::Singleton< OurType_ >::destroy_instance ( )

Destroy our instance.

template<typename OurType_>
static OurType_* paludis::Singleton< OurType_ >::get_instance ( )

Fetch our instance.

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