Scroom  0.14
Scroom::Utils::Counted< C > Class Template Reference

#include <utilities.hh>

Collaboration diagram for Scroom::Utils::Counted< C >:
Collaboration graph

Public Member Functions

 Counted ()
 
 Counted (const Counted &)
 
 Counted (Counted &&)
 
Countedoperator= (const Counted &)=default
 
Countedoperator= (Counted &&)=default
 
virtual ~Counted ()
 

Static Public Member Functions

static Count::Ptr count_instance ()
 

Private Attributes

Count::Ptr data
 

Constructor & Destructor Documentation

◆ Counted() [1/3]

template<class C >
Scroom::Utils::Counted< C >::Counted ( )
inline
194  : data(count_instance())
195  {
196  data->inc();
197  }

◆ Counted() [2/3]

template<class C >
Scroom::Utils::Counted< C >::Counted ( const Counted< C > &  )
inline
200  : data(count_instance())
201  {
202  data->inc();
203  }

◆ Counted() [3/3]

template<class C >
Scroom::Utils::Counted< C >::Counted ( Counted< C > &&  )
inline
206  : data(count_instance())
207  {
208  data->inc();
209  }

◆ ~Counted()

template<class C >
virtual Scroom::Utils::Counted< C >::~Counted ( )
inlinevirtual
214 { data->dec(); }

Member Function Documentation

◆ count_instance()

template<class C >
static Count::Ptr Scroom::Utils::Counted< C >::count_instance ( )
inlinestatic
188  {
189  static Count::Ptr const instance = Count::create(typeid(C).name());
190  return instance;
191  }

◆ operator=() [1/2]

template<class C >
Counted& Scroom::Utils::Counted< C >::operator= ( const Counted< C > &  )
default

◆ operator=() [2/2]

template<class C >
Counted& Scroom::Utils::Counted< C >::operator= ( Counted< C > &&  )
default

Member Data Documentation

◆ data


The documentation for this class was generated from the following file:
Scroom::Utils::Count::Ptr
boost::shared_ptr< Count > Ptr
Definition: utilities.hh:129
Scroom::Utils::Counted::count_instance
static Count::Ptr count_instance()
Definition: utilities.hh:187
Scroom::Utils::Counted::data
Count::Ptr data
Definition: utilities.hh:184
anonymous_namespace{progressbarmanager.cc}::instance
ProgressBarPulser::Ptr instance()
Definition: progressbarmanager.cc:43
Scroom::Utils::Count::create
static Ptr create(const std::string &name)
Definition: counter.cc:39