Class for instantiating Components, Links and the like out of element libraries. More...
#include <factory.h>
Data Structures | |
struct | ComponentInfo |
struct | IntrospectorInfo |
struct | ModuleInfo |
struct | SubComponentInfo |
Public Member Functions | |
const std::vector< std::string > * | GetComponentAllowedPorts (std::string type) |
Get a list of allowed ports for a given component type. | |
Component * | CreateComponent (ComponentId_t id, std::string componentname, Params ¶ms) |
Attempt to create a new Component instantiation. | |
Introspector * | CreateIntrospector (std::string introspectorname, Params ¶ms) |
Attempt to create a new Introspector instantiation. | |
void | RequireEvent (std::string eventname) |
Ensure that an element library containing the required event is loaded. | |
Module * | CreateModule (std::string type, Params ¶ms) |
Instatiate a new Module. | |
Module * | CreateModuleWithComponent (std::string type, Component *comp, Params ¶ms) |
Instatiate a new Module. | |
Module * | CreateCoreModule (std::string type, Params ¶ms) |
Instantiate a new Module from within the SST core. | |
Module * | CreateCoreModuleWithComponent (std::string type, Component *comp, Params ¶ms) |
Instantiate a new Module from within the SST core. | |
SubComponent * | CreateSubComponent (std::string type, Component *comp, Params ¶ms) |
Instatiate a new Module. | |
partitionFunction | GetPartitioner (std::string name) |
Return partitioner function. | |
generateFunction | GetGenerator (std::string name) |
Return generator function. | |
genPythonModuleFunction | getPythonModule (std::string name) |
Instatiate a new StatisticBase Object. | |
bool | hasLibrary (std::string elemlib) |
Checks to see if library exists and can be loaded. | |
void | getLoadedLibraryNames (std::set< std::string > &lib_names) |
void | loadUnloadedLibraries (const std::set< std::string > &lib_names) |
StatisticOutput * | CreateStatisticOutput (std::string &statOutputType, Params &statOutputParams) |
Attempt to create a new Statistic Output instantiation. | |
bool | DoesComponentInfoStatisticNameExist (const std::string &type, const std::string &statisticName) |
Determine if a statistic is defined in a components ElementInfoStatistic. | |
bool | DoesSubComponentInfoStatisticNameExist (const std::string &type, const std::string &statisticName) |
Determine if a statistic is defined in a subcomponents ElementInfoStatistic. | |
uint8_t | GetComponentInfoStatisticEnableLevel (const std::string &type, const std::string &statisticName) |
Get the enable level of a statistic defined in the component's ElementInfoStatistic. | |
std::string | GetComponentInfoStatisticUnits (const std::string &type, const std::string &statisticName) |
Get the units of a statistic defined in the component's ElementInfoStatistic. | |
Protected Attributes | |
Output & | out |
Friends | |
class | SST::SimulationBase |
class | boost::serialization::access |
template<class Archive > | |
void | save_construct_data (Archive &ar, const Factory *t, const unsigned int file_version) |
template<class Archive > | |
void | load_construct_data (Archive &ar, Factory *t, const unsigned int file_version) |
Class for instantiating Components, Links and the like out of element libraries.
Component * SST::Factory::CreateComponent | ( | ComponentId_t | id, | |
std::string | componentname, | |||
Params & | params | |||
) |
Attempt to create a new Component instantiation.
id | - The unique ID of the component instantiation | |
componentname | - The fully qualified elementlibname.componentname type of component | |
params | - The params to pass to the component's constructor |
References SST::Output::fatal(), SST::Simulation::getComponentLinkMap(), SST::Simulation::getSimulation(), SST::Params::popAllowedKeys(), SST::Params::pushAllowedKeys(), and SST::LinkMap::setAllowedPorts().
Instantiate a new Module from within the SST core.
type | - Name of the module to load (just modulename, not element.modulename) | |
params | - Parameters to pass to the module at constructor time |
References SST::Output::fatal().
Referenced by CreateModule().
Module * SST::Factory::CreateCoreModuleWithComponent | ( | std::string | type, | |
Component * | comp, | |||
Params & | params | |||
) |
Instantiate a new Module from within the SST core.
type | - Name of the module to load (just modulename, not element.modulename) | |
params | - Parameters to pass to the module at constructor time |
References SST::Output::fatal().
Referenced by CreateModuleWithComponent().
Introspector * SST::Factory::CreateIntrospector | ( | std::string | introspectorname, | |
Params & | params | |||
) |
Attempt to create a new Introspector instantiation.
introspectorname | - The fully qualified elementlibname.introspectorname type of introspector | |
params | - The params to pass to the introspectors's constructor |
References SST::Output::fatal(), SST::Params::popAllowedKeys(), and SST::Params::pushAllowedKeys().
Instatiate a new Module.
type | - Fully qualified elementlibname.modulename type | |
params | - Parameters to pass to the Module's constructor |
References CreateCoreModule(), SST::Output::fatal(), SST::Simulation::getSimulation(), SST::Simulation::getSimulationOutput(), SST::Params::popAllowedKeys(), and SST::Params::pushAllowedKeys().
Referenced by CreateStatisticOutput(), and SST::Component::loadModule().
Module * SST::Factory::CreateModuleWithComponent | ( | std::string | type, | |
Component * | comp, | |||
Params & | params | |||
) |
Instatiate a new Module.
type | - Fully qualified elementlibname.modulename type | |
comp | - Component instance to pass to the Module's constructor | |
params | - Parameters to pass to the Module's constructor |
References CreateCoreModuleWithComponent(), SST::Output::fatal(), SST::Params::popAllowedKeys(), and SST::Params::pushAllowedKeys().
Referenced by SST::Component::loadModuleWithComponent().
StatisticOutput * SST::Factory::CreateStatisticOutput | ( | std::string & | statOutputType, | |
Params & | statOutputParams | |||
) |
Attempt to create a new Statistic Output instantiation.
statOutputType | - The name of the Statistic Output to create (Module Name) | |
statOutputParams | - The params to pass to the statistic output's constructor |
References CreateModule().
Referenced by SST::Simulation::performWireUp().
SubComponent * SST::Factory::CreateSubComponent | ( | std::string | type, | |
Component * | comp, | |||
Params & | params | |||
) |
Instatiate a new Module.
type | - Fully qualified elementlibname.modulename type | |
comp | - Component instance to pass to the SubComponent's constructor | |
params | - Parameters to pass to the SubComponent's constructor |
References SST::Output::fatal(), SST::Params::popAllowedKeys(), and SST::Params::pushAllowedKeys().
Referenced by SST::Component::loadSubComponent().
bool SST::Factory::DoesComponentInfoStatisticNameExist | ( | const std::string & | type, | |
const std::string & | statisticName | |||
) |
Determine if a statistic is defined in a components ElementInfoStatistic.
type | - The name of the component | |
statisticName | - The name of the statistic |
References SST::Output::fatal().
bool SST::Factory::DoesSubComponentInfoStatisticNameExist | ( | const std::string & | type, | |
const std::string & | statisticName | |||
) |
Determine if a statistic is defined in a subcomponents ElementInfoStatistic.
type | - The name of the subcomponent | |
statisticName | - The name of the statistic |
References SST::Output::fatal().
const std::vector< std::string > * SST::Factory::GetComponentAllowedPorts | ( | std::string | type | ) |
Get a list of allowed ports for a given component type.
type | - Name of component in lib.name format |
References SST::Output::fatal().
Referenced by SST::Simulation::getComponentAllowedPorts().
uint8_t SST::Factory::GetComponentInfoStatisticEnableLevel | ( | const std::string & | type, | |
const std::string & | statisticName | |||
) |
Get the enable level of a statistic defined in the component's ElementInfoStatistic.
componentname | - The name of the component | |
statisticName | - The name of the statistic |
References SST::Output::fatal().
std::string SST::Factory::GetComponentInfoStatisticUnits | ( | const std::string & | type, | |
const std::string & | statisticName | |||
) |
Get the units of a statistic defined in the component's ElementInfoStatistic.
componentname | - The name of the component | |
statisticName | - The name of the statistic |
References SST::Output::fatal().
generateFunction SST::Factory::GetGenerator | ( | std::string | name | ) |
Return generator function.
name | - Fully qualified elementlibname.generator type name |
References SST::Output::fatal(), and SST::ElementInfoGenerator::func.
partitionFunction SST::Factory::GetPartitioner | ( | std::string | name | ) |
Return partitioner function.
name | - Fully qualified elementlibname.partitioner type name |
References SST::Output::fatal(), and SST::ElementInfoPartitioner::func.
genPythonModuleFunction SST::Factory::getPythonModule | ( | std::string | name | ) |
Instatiate a new StatisticBase Object.
type | - Fully qualified elementlibname.statisticname type | |
params | - Parameters to pass to the Statistics's constructor Instatiate a new Statistic | |
type | - Fully qualified elementlibname.statisticname type | |
params | - Parameters to pass to the Statistics's constructor Return Python Module creation function | |
name | - Fully qualified elementlibname.pythonModName type name |
References SST::ElementLibraryInfo::pythonModuleGenerator.
void SST::Factory::RequireEvent | ( | std::string | eventname | ) |
Ensure that an element library containing the required event is loaded.
eventname | - The fully qualified elementlibname.eventname type |
References SST::Output::fatal().
Referenced by SST::Simulation::requireEvent().