SST  9.1.0
StructuralSimulationToolkit
SST::SubComponentSlotInfo Class Reference

Used to load SubComponents when multiple SubComponents are loaded into a single slot (will also also work when a single SubComponent is loaded). More...

#include <baseComponent.h>

Public Member Functions

 SubComponentSlotInfo (BaseComponent *comp, std::string slot_name)
 
const std::string & getSlotName () const
 
bool isPopulated (int slot_num) const
 
bool isAllPopulated () const
 
int getMaxPopulatedSlotNumber () const
 
template<typename T >
T * create (int slot_num, Params &params) const
 
template<typename T >
void createAll (Params &params, std::vector< T * > &vec, bool insertNulls=true) const
 
template<typename T >
void createAll (std::vector< T * > &vec, bool insertNulls=true) const
 
template<typename T >
T * create (int slot_num) const
 Create a user defined subcomponent (defined in input file to SST run). More...
 
template<class T , class... ARGS>
T * create (int slot_num, uint64_t share_flags, ARGS...args) const
 Create a user defined subcomponent (defined in input file to SST run). More...
 
template<typename T , class... ARGS>
void createAll (std::vector< T * > &vec, uint64_t share_flags, ARGS...args) const
 Create all user defined subcomponents (defined in input file to SST run) for the slot. More...
 
template<typename T , class... ARGS>
void createAllSparse (std::vector< std::pair< int, T * > > &vec, uint64_t share_flags, ARGS...args) const
 Create all user defined subcomponents (defined in input file to SST run) for the slot. More...
 
template<typename T , class... ARGS>
void createAllSparse (std::vector< T * > &vec, uint64_t share_flags, ARGS...args) const
 Create all user defined subcomponents (defined in input file to SST run) for the slot. More...
 

Protected Member Functions

SubComponentprotected_create (int slot_num, Params &params) const
 

Detailed Description

Used to load SubComponents when multiple SubComponents are loaded into a single slot (will also also work when a single SubComponent is loaded).

Member Function Documentation

template<typename T >
T* SST::SubComponentSlotInfo::create ( int  slot_num) const
inline

Create a user defined subcomponent (defined in input file to SST run).

This call will pass SHARE_NONE to the new subcomponent and will not take constructor arguments. If constructor arguments are needed for the API that is being loaded, the full call to create will need to be used create(slot_num, share_flags, args...).

Parameters
slot_numSlot index from which to load subcomponent

This function supports the new API, but is identical to an existing API call. It will try to load using new API and will fallback to old if unsuccessful.

template<class T , class... ARGS>
T* SST::SubComponentSlotInfo::create ( int  slot_num,
uint64_t  share_flags,
ARGS...  args 
) const
inline

Create a user defined subcomponent (defined in input file to SST run).

Parameters
slot_numSlot index from which to load subcomponent
share_flagsShare flags to be used by subcomponent
argsArguments to be passed to constructor. This signature is defined in the API definition

For ease in backward compatibility to old API, this call will try to load using new API and will fallback to old if unsuccessful.

template<typename T , class... ARGS>
void SST::SubComponentSlotInfo::createAll ( std::vector< T * > &  vec,
uint64_t  share_flags,
ARGS...  args 
) const
inline

Create all user defined subcomponents (defined in input file to SST run) for the slot.

Parameters
vecVector of T* that will hold the pointers to the new subcomponents. If an index is not occupied, a nullptr will be put in it's place. All components will be added to the end of the vector, so index N will be at vec.length() + N, where vec.length() is the length of the vector when it is passed to the call.
share_flagsShare flags to be used by subcomponent
argsArguments to be passed to constructor. This signature is defined in the API definition

For ease in backward compatibility to old API, this call will try to load using new API and will fallback to old if unsuccessful.

template<typename T , class... ARGS>
void SST::SubComponentSlotInfo::createAllSparse ( std::vector< std::pair< int, T * > > &  vec,
uint64_t  share_flags,
ARGS...  args 
) const
inline

Create all user defined subcomponents (defined in input file to SST run) for the slot.

Parameters
vecVector of pair<int,T*> that will hold the pointers to the new subcomponents. The int will hold the index from which the subcomponent wass loaded. Unoccupied indexes will be skipped. All components will be added to the end of the vector.
share_flagsShare flags to be used by subcomponent
argsArguments to be passed to constructor. This signature is defined in the API definition

For ease in backward compatibility to old API, this call will try to load using new API and will fallback to old if unsuccessful.

template<typename T , class... ARGS>
void SST::SubComponentSlotInfo::createAllSparse ( std::vector< T * > &  vec,
uint64_t  share_flags,
ARGS...  args 
) const
inline

Create all user defined subcomponents (defined in input file to SST run) for the slot.

Parameters
vecVector of T* that will hold the pointers to the new subcomponents. Unoccupied indexes will be skipped. All components will be added to the end of the vector.
share_flagsShare flags to be used by subcomponent
argsArguments to be passed to constructor. This signature is defined in the API definition

For ease in backward compatibility to old API, this call will try to load using new API and will fallback to old if unsuccessful.


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