12 #ifndef SST_CORE_SUBCOMPSLOTINFO_H
13 #define SST_CORE_SUBCOMPSLOTINFO_H
18 #include "sst/core/eli/elibase.h"
23 template <
class T,
class Enable=
void>
25 static const std::vector<SST::ElementInfoSubComponentSlot>&
get() {
26 static std::vector<SST::ElementInfoSubComponentSlot> var = { };
33 typename
MethodDetect<decltype(T::ELI_getSubComponentSlots())>::type> {
34 static const std::vector<SST::ElementInfoSubComponentSlot>&
get() {
35 return T::ELI_getSubComponentSlots();
41 const std::vector<ElementInfoSubComponentSlot>& getSubComponentSlots()
const {
45 void toString(std::ostream& os)
const;
47 template <
class XMLNode>
void outputXML(XMLNode* node)
const {
50 auto* element =
new XMLNode(
"SubComponentSlot");
51 element->SetAttribute(
"Index", idx);
52 element->SetAttribute(
"Name", slot.name);
53 element->SetAttribute(
"Description", slot.description ? slot.description :
"none");
54 element->SetAttribute(
"Interface", slot.superclass ? slot.superclass :
"none");
55 node->LinkEndChild(element);
67 std::vector<ElementInfoSubComponentSlot> slots_;
73 #define SST_ELI_DOCUMENT_SUBCOMPONENT_SLOTS(...) \
74 static const std::vector<SST::ElementInfoSubComponentSlot>& ELI_getSubComponentSlots() { \
75 static std::vector<SST::ElementInfoSubComponentSlot> var = { __VA_ARGS__ } ; \
Definition: elibase.h:105
Definition: subcompSlotInfo.h:39
Definition: subcompSlotInfo.h:24