12 #ifndef SST_CORE_ELIBASE_H
13 #define SST_CORE_ELIBASE_H
15 #include "sst/core/sst_types.h"
27 #define COMPONENT_CATEGORY_UNCATEGORIZED 0x00
28 #define COMPONENT_CATEGORY_PROCESSOR 0x01
29 #define COMPONENT_CATEGORY_MEMORY 0x02
30 #define COMPONENT_CATEGORY_NETWORK 0x04
31 #define COMPONENT_CATEGORY_SYSTEM 0x08
69 std::vector<std::string> createVector(
const char** events) {
70 std::vector<std::string> vec;
71 if ( events ==
nullptr )
return vec;
72 const char** ev = events;
73 while (
nullptr != *ev ) {
90 description(description),
91 validEvents(validEvents)
97 const char * description;
98 const char * superclass;
108 virtual void load() = 0;
114 using InfoMap=std::map<std::string,std::list<LibraryLoader*>>;
115 using LibraryMap=std::map<std::string,InfoMap>;
117 static bool isLoaded(
const std::string& name);
122 static bool addLoader(
const std::string& lib,
const std::string& name,
125 static const LibraryMap& getLoaders();
128 static std::unique_ptr<LibraryMap> loaders_;
135 #define ELI_FORWARD_AS_ONE(...) __VA_ARGS__
137 #define SST_ELI_DECLARE_BASE(Base) \
138 using __LocalEliBase = Base; \
139 static const char* ELI_baseName(){ return #Base; }
141 #define SST_ELI_DECLARE_INFO_COMMON() \
142 using InfoLibrary = ::SST::ELI::InfoLibrary<__LocalEliBase>; \
143 template <class __TT> static bool addDerivedInfo(const std::string& lib, const std::string& elem){ \
144 return addInfo(lib,elem,new BuilderInfo(lib,elem,(__TT*)nullptr)); \
147 #define SST_ELI_DECLARE_NEW_BASE(OldBase,NewBase) \
148 using __LocalEliBase = NewBase; \
149 using __ParentEliBase = OldBase; \
150 SST_ELI_DECLARE_INFO_COMMON() \
151 static const char* ELI_baseName(){ return #NewBase; } \
152 template <class InfoImpl> static bool addInfo(const std::string& elemlib, const std::string& elem, \
154 return OldBase::addInfo(elemlib, elem, info) \
155 && ::SST::ELI::InfoDatabase::getLibrary<NewBase>(elemlib)->addInfo(elem,info); \
159 #endif // SST_CORE_ELIBASE_H
Definition: elibase.h:112
const char * defaultValue
Definition: elibase.h:49
const char * description
Definition: elibase.h:48
const char * description
Definition: elibase.h:64
const char ** validEvents
Definition: elibase.h:57
Describes Ports that the Component can use.
Definition: elibase.h:62
Definition: elibase.h:105
Describes Statistics used by a Component.
Definition: elibase.h:37
Definition: elibase.h:107
const char * description
Definition: elibase.h:56
const char * name
Definition: elibase.h:47
const char * name
Definition: elibase.h:38
Describes Parameters to a Component.
Definition: elibase.h:46
const char * description
Definition: elibase.h:39
const char * name
Definition: elibase.h:55
const uint8_t enableLevel
Definition: elibase.h:41
const char * name
Definition: elibase.h:63
Describes Ports that the Component can use.
Definition: elibase.h:54
const std::vector< std::string > validEvents
Definition: elibase.h:65
static bool addLoader(const std::string &lib, const std::string &name, LibraryLoader *loader)
Definition: elibase.cc:29
const char * units
Definition: elibase.h:40