12 #ifndef SST_CORE_ELI_SIMPLE_INFO_H 13 #define SST_CORE_ELI_SIMPLE_INFO_H 15 #include "sst/core/eli/elibase.h" 17 #include <type_traits> 28 template <
int num,
typename InfoType>
37 template <
class T,
int index,
class InfoType>
40 template <
typename F, F>
44 using NotMatch = long;
49 static Match HasFunction(check<functionsig, &F::ELI_getSimpleInfo>*);
52 static NotMatch HasFunction(...);
55 static bool const value = (
sizeof(HasFunction<T>(0)) ==
sizeof(Match));
58 template <
class T,
int index,
class InfoType>
59 inline constexpr
bool checkForELI_getSimpleInfoFunction_v =
64 template <
class T,
int index,
class InfoType>
65 std::enable_if_t<checkForELI_getSimpleInfoFunction_v<T, index, InfoType>,
const InfoType&>
66 ELI_templatedGetSimpleInfo()
71 template <
class T,
int index,
class InfoType>
72 std::enable_if_t<!checkForELI_getSimpleInfoFunction_v<T, index, InfoType>,
const InfoType&>
73 ELI_templatedGetSimpleInfo()
86 template <
int num,
typename InfoType>
90 const InfoType& getSimpleInfo()
const {
return info_; }
95 info_(ELI_templatedGetSimpleInfo<T, num, InfoType>())
106 #define SST_ELI_DOCUMENT_SIMPLE_INFO(type, index, ...) \ 107 static const type& ELI_getSimpleInfo(SST::ELI::SimpleInfoPlaceHolder<index, type> UNUSED(a)) \ 109 static type my_info = { __VA_ARGS__ }; \ 113 #endif // SST_CORE_ELI_SIMPLE_INFO_H Definition: simpleInfo.h:87
Definition: attributeInfo.h:22
Definition: simpleInfo.h:29
Definition: simpleInfo.h:38