12#ifndef SST_CORE_ELI_PORTS_INFO_H
13#define SST_CORE_ELI_PORTS_INFO_H
15#include "sst/core/eli/elibase.h"
23template <
class T,
class Enable =
void>
26 static const std::vector<SST::ElementInfoPort>& get()
28 static std::vector<SST::ElementInfoPort> var = {};
36 static const std::vector<SST::ElementInfoPort>& get() {
return T::ELI_getPorts(); }
42 const std::vector<std::string>& getPortnames() {
return portnames; }
43 const std::vector<ElementInfoPort>& getValidPorts()
const {
return ports_; }
45 void toString(std::ostream& os)
const;
47 template <
class XMLNode>
48 void outputXML(XMLNode* node)
const
52 for (
auto& port : ports_ ) {
53 auto* XMLPortElement =
new XMLNode(
"Port");
54 XMLPortElement->SetAttribute(
"Index", idx);
55 XMLPortElement->SetAttribute(
"Name", port.name);
56 XMLPortElement->SetAttribute(
"Description", port.description ? port.description :
"none");
57 node->LinkEndChild(XMLPortElement);
72 std::vector<std::string> portnames;
73 std::vector<ElementInfoPort> ports_;
80#define SST_ELI_DOCUMENT_PORTS(...) \
81 static const std::vector<SST::ElementInfoPort>& ELI_getPorts() \
83 static std::vector<SST::ElementInfoPort> var = { __VA_ARGS__ }; \
84 auto parent = SST::ELI::InfoPorts< \
85 std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \
86 SST::ELI::combineEliInfo(var, parent); \
91#define SST_ELI_DELETE_PORT(port) \
Definition: portsInfo.h:40
Definition: portsInfo.h:25
Definition: elibase.h:130