12#ifndef SST_CORE_ELI_SIMPLE_INFO_H
13#define SST_CORE_ELI_SIMPLE_INFO_H
15#include "sst/core/eli/elibase.h"
28template <
int num,
typename InfoType>
37template <
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));
58template <
class T,
int index,
class InfoType>
59inline constexpr bool checkForELI_getSimpleInfoFunction_v =
60 checkForELI_getSimpleInfoFunction<T, index, InfoType>::value;
64template <
class T,
int index,
class InfoType>
65std::enable_if_t<checkForELI_getSimpleInfoFunction_v<T, index, InfoType>,
const InfoType&>
66ELI_templatedGetSimpleInfo()
71template <
class T,
int index,
class InfoType>
72std::enable_if_t<!checkForELI_getSimpleInfoFunction_v<T, index, InfoType>,
const InfoType&>
73ELI_templatedGetSimpleInfo()
86template <
int num,
typename InfoType>
87class ProvidesSimpleInfo
90 const InfoType& getSimpleInfo()
const {
return info_; }
94 explicit ProvidesSimpleInfo(T* UNUSED(t)) :
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__ }; \
Definition simpleInfo.h:39
Definition simpleInfo.h:30