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>
|
| SubComponentSlotInfo (BaseComponent *comp, const std::string &slot_name) |
|
const std::string & | getSlotName () const |
|
bool | isPopulated (int slot_num) const |
|
bool | isAllPopulated () const |
|
int | getMaxPopulatedSlotNumber () const |
|
template<class T > |
bool | isLoadableUsingAPI (int slot_num) |
| Check to see if the element type loaded by the user into the specified slot index is loadable with a particular API. More...
|
|
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...
|
|
Used to load SubComponents when multiple SubComponents are loaded into a single slot (will also also work when a single SubComponent is loaded).
◆ create() [1/2]
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_num | Slot 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.
◆ create() [2/2]
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_num | Slot index from which to load subcomponent |
share_flags | Share flags to be used by subcomponent |
args | Arguments 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.
◆ createAll()
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
-
vec | Vector 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_flags | Share flags to be used by subcomponent |
args | Arguments 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.
◆ createAllSparse() [1/2]
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
-
vec | Vector 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_flags | Share flags to be used by subcomponent |
args | Arguments 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.
◆ createAllSparse() [2/2]
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
-
vec | Vector 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_flags | Share flags to be used by subcomponent |
args | Arguments 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.
◆ isLoadableUsingAPI()
template<class T >
bool SST::SubComponentSlotInfo::isLoadableUsingAPI |
( |
int |
slot_num | ) |
|
|
inline |
Check to see if the element type loaded by the user into the specified slot index is loadable with a particular API.
- Parameters
-
slot_num | Slot index to check |
- Returns
- True if loadable as the API specified as the template parameter
The documentation for this class was generated from the following file: