12 #ifndef SST_CORE_ELI_ATTRIBUTE_INFO_H 13 #define SST_CORE_ELI_ATTRIBUTE_INFO_H 15 #include "sst/core/eli/elibase.h" 16 #include "sst/core/warnmacros.h" 24 template <
class T,
class Enable =
void>
27 static const std::vector<SST::ElementInfoAttribute>&
get()
29 static std::vector<SST::ElementInfoAttribute> var = {};
37 static const std::vector<SST::ElementInfoAttribute>&
get() {
return T::ELI_getAttributes(); }
43 const std::vector<ElementInfoAttribute>& getAttributes()
const {
return attributes_; }
45 void toString(std::ostream& os)
const;
47 template <
class XMLNode>
48 void outputXML(XMLNode* node)
const 55 auto* XMLAttributeElement =
new XMLNode(
"Attribute");
56 XMLAttributeElement->SetAttribute(
"Index", idx);
57 XMLAttributeElement->SetAttribute(
"Name", attribute.name);
58 XMLAttributeElement->SetAttribute(
"Value", attribute.value ? attribute.value :
"none");
59 node->LinkEndChild(XMLAttributeElement);
70 std::vector<ElementInfoAttribute> attributes_;
77 #define SST_ELI_DOCUMENT_ATTRIBUTES(...) \ 78 static const std::vector<SST::ElementInfoAttribute>& ELI_getAttributes() \ 80 static std::vector<SST::ElementInfoAttribute> var = { __VA_ARGS__ }; \ 81 auto parent = SST::ELI::GetAttributes< \ 82 typename std::conditional<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>::type>::get(); \ 83 SST::ELI::combineEliInfo(var, parent); \ 88 #define SST_ELI_DELETE_ATTRIBUTE(attribute) \ 93 #endif // SST_CORE_ELI_ATTRIBUTE_INFO_H
Definition: attributeInfo.h:25
Definition: elibase.h:129
Definition: attributeInfo.h:40