12 #ifndef SST_CORE_SUBCOMPONENT_H
13 #define SST_CORE_SUBCOMPONENT_H
15 #include "sst/core/baseComponent.h"
16 #include "sst/core/eli/elementinfo.h"
17 #include "sst/core/module.h"
18 #include "sst/core/warnmacros.h"
34 SST_ELI_DECLARE_CTOR_EXTERN(ComponentId_t)
37 SST_ELI_DECLARE_INFO_EXTERN(
52 virtual void init(
unsigned int UNUSED(phase))
override {}
55 virtual void setup()
override {}
64 namespace SUBCOMPONENT {
71 [[deprecated(
"SST_ELI_REGISTER_SUBCOMPONENT_DERIVED is deprecated and will be removed in SST 14. Please use the "
72 "SST_ELI_REGISTER_SUBCOMPONENT macro")]]
static constexpr
int
73 fake_deprecated_function()
86 #define SST_ELI_REGISTER_SUBCOMPONENT_API(cls, ...) \
87 SST_ELI_DECLARE_NEW_BASE(SST::SubComponent,::cls) \
88 SST_ELI_NEW_BASE_CTOR(SST::ComponentId_t,SST::Params&,##__VA_ARGS__)
90 #define SST_ELI_REGISTER_SUBCOMPONENT_DERIVED_API(cls, base, ...) \
91 SST_ELI_DECLARE_NEW_BASE(::base,::cls) \
92 SST_ELI_NEW_BASE_CTOR(SST::ComponentId_t,SST::Params&,##__VA_ARGS__)
94 #define SST_ELI_REGISTER_SUBCOMPONENT_DERIVED(cls, lib, name, version, desc, interface) \
95 static const int SST_ELI_FAKE_VALUE = \
96 SST::SUBCOMPONENT::sst_eli_fake_deprecated_class::fake_deprecated_function(); \
97 SST_ELI_REGISTER_DERIVED(::interface,cls,lib,name,ELI_FORWARD_AS_ONE(version),desc) \
98 SST_ELI_INTERFACE_INFO(#interface)
100 #define SST_ELI_REGISTER_SUBCOMPONENT(cls, lib, name, version, desc, interface) \
101 SST_ELI_REGISTER_DERIVED(::interface,cls,lib,name,ELI_FORWARD_AS_ONE(version),desc) \
102 SST_ELI_INTERFACE_INFO(#interface)
Main component object for the simulation.
Definition: baseComponent.h:52
Main component object for the simulation.
Definition: component.h:31
Definition: attributeInfo.h:41
Definition: interfaceInfo.h:19
Definition: paramsInfo.h:41
Definition: portsInfo.h:40
Definition: profilePointInfo.h:40
Definition: statsInfo.h:40
Definition: subcompSlotInfo.h:40
Definition: subcomponent.h:69
SubComponent is a class loadable through the factory which allows dynamic functionality to be added t...
Definition: subcomponent.h:29
virtual void setup() override
Called after all components have been constructed and initialization has completed,...
Definition: subcomponent.h:55
virtual void finish() override
Called after simulation completes, but before objects are destroyed.
Definition: subcomponent.h:58
virtual void init(unsigned int UNUSED(phase)) override
Used during the init phase.
Definition: subcomponent.h:52