16#ifndef SIMICS_SYSTEMC_INSTANCE_COUNTER_H
17#define SIMICS_SYSTEMC_INSTANCE_COUNTER_H
35 ++m_instances[sc_core::sc_curr_simcontext];
40 --m_instances[sc_core::sc_curr_simcontext];
43 return m_instances[sc_core::sc_curr_simcontext];
47 static std::map<sc_core::sc_simcontext *, int> m_instances;
50template<
class T> std::map<sc_core::sc_simcontext *, int>
51 InstanceCounter<T>::m_instances;
Keeps track of (counts) the number of instances for this type of class.
Definition: instance_counter.h:32
static int instances()
Definition: instance_counter.h:42
InstanceCounter()
Definition: instance_counter.h:34
InstanceCounter & operator=(const InstanceCounter &)=delete
InstanceCounter(const InstanceCounter &)=delete
virtual ~InstanceCounter()
Definition: instance_counter.h:39
Definition: pci_bus_interface.h:24