12 #ifndef SST_CORE_ELI_PARAMS_INFO_H 13 #define SST_CORE_ELI_PARAMS_INFO_H 15 #include "sst/core/eli/elibase.h" 18 #include <type_traits> 23 template <
typename,
typename =
void>
26 static const std::vector<SST::ElementInfoParam>&
get()
28 static std::vector<SST::ElementInfoParam> var = {};
34 struct GetParams<T, std::void_t<decltype(T::ELI_getParams())>>
36 static const std::vector<SST::ElementInfoParam>&
get() {
return T::ELI_getParams(); }
42 const std::vector<ElementInfoParam>& getValidParams()
const {
return params_; }
44 void toString(std::ostream& os)
const;
46 template <
class XMLNode>
47 void outputXML(XMLNode* node)
const 54 auto* XMLParameterElement =
new XMLNode(
"Parameter");
55 XMLParameterElement->SetAttribute(
"Index", idx);
56 XMLParameterElement->SetAttribute(
"Name", param.name);
57 XMLParameterElement->SetAttribute(
"Description", param.description ? param.description :
"none");
58 XMLParameterElement->SetAttribute(
"Default", param.defaultValue ? param.defaultValue :
"none");
59 node->LinkEndChild(XMLParameterElement);
64 const std::vector<std::string>& getParamNames()
const {
return allowedKeys; }
77 std::vector<std::string> allowedKeys;
78 std::vector<ElementInfoParam> params_;
84 #define SST_ELI_DOCUMENT_PARAMS(...) \ 85 static const std::vector<SST::ElementInfoParam>& ELI_getParams() \ 87 static std::vector<SST::ElementInfoParam> var = { __VA_ARGS__ }; \ 88 auto parent = SST::ELI::GetParams< \ 89 std::conditional_t<(__EliDerivedLevel > __EliBaseLevel), __LocalEliBase, __ParentEliBase>>::get(); \ 90 SST::ELI::combineEliInfo(var, parent); \ 95 #define SST_ELI_DELETE_PARAM(param) { param, nullptr, nullptr } 97 #endif // SST_CORE_ELI_PARAMS_INFO_H Definition: paramsInfo.h:24
Definition: paramsInfo.h:39
Definition: attributeInfo.h:22
Describes Parameters to a Component.
Definition: elibase.h:48