The Factory and TimeLord objects both should only be associated with a simulation object and never created on their own. More...
#include <simulation.h>
Public Member Functions | |
Factory * | getFactory (void) const |
Return the Factory associated with this Simulation. | |
TimeLord * | getTimeLord (void) const |
Return the TimeLord associated with this Simulation. | |
StatisticOutput * | getStatisticsOutput (void) const |
Return the Statistic Output associated with this Simulation. | |
StatisticProcessingEngine * | getStatisticsProcessingEngine (void) const |
Return the Statistic Processing Engine associated with this Simulation. | |
Protected Member Functions | |
SimulationBase (Config *config) | |
Constructor. | |
TimeConverter * | minPartToTC (SimTime_t cycles) const |
Get a handle to a TimeConverter. | |
Protected Attributes | |
Factory * | factory |
Factory used to generate the simulation components. | |
TimeLord * | timeLord |
TimeLord of the simulation. | |
StatisticOutput * | statisticsOutput |
Statistics Output of the simulation. | |
StatisticProcessingEngine * | statisticsEngine |
Statistics Timing Engine of the simulation. | |
Friends | |
class | boost::serialization::access |
The Factory and TimeLord objects both should only be associated with a simulation object and never created on their own.
To accomplish this, create a base class of Simluation which is friended by both Factory and TimeLord. The friendship is not inherited by the Simulation class, limiting the exposure of internal information to the 20 line object below and it is impossible to create either a Factory or a timeLord without a simulation object.
SST::SimulationBase::SimulationBase | ( | Config * | config | ) | [protected] |
Constructor.
config | - Configuration to use for this simulation |
References factory, SST::Config::getLibPath(), statisticsEngine, statisticsOutput, SST::Config::timeBase, and timeLord.
TimeConverter * SST::SimulationBase::minPartToTC | ( | SimTime_t | cycles | ) | const [protected] |
Get a handle to a TimeConverter.
cycles | Frequency which is the base of the TimeConverter |
References SST::TimeLord::getTimeConverter(), and timeLord.
Referenced by SST::Simulation::performWireUp().