12 #ifndef SST_CORE_LINKMAP_H
13 #define SST_CORE_LINKMAP_H
15 #include "sst/core/component.h"
16 #include "sst/core/link.h"
17 #include "sst/core/sst_types.h"
31 std::map<std::string, Link*> linkMap;
33 std::vector<std::string> selfPorts;
124 #if !SST_BUILDING_CORE
126 deprecated(
"LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
132 #if !SST_BUILDING_CORE
134 deprecated(
"LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
140 for ( std::map<std::string, Link*>::iterator it = linkMap.begin(); it != linkMap.end(); ++it ) {
158 #if !SST_BUILDING_CORE
160 deprecated(
"LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
165 selfPorts.push_back(name);
168 #if !SST_BUILDING_CORE
169 bool isSelfPort(
const std::string& name)
const __attribute__((
170 deprecated(
"LinkMap class was not intended to be used otuside of SST Core and will be removed in SST 12.")))
172 bool isSelfPort(
const std::string& name)
const
175 for ( std::vector<std::string>::const_iterator i = selfPorts.begin(); i != selfPorts.end(); ++i ) {
178 if ( name == *i ) {
return true; }
184 #if !SST_BUILDING_CORE
186 deprecated(
"LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
191 linkMap.insert(std::pair<std::string, Link*>(name, link));
194 #if !SST_BUILDING_CORE
195 void removeLink(
const std::string& name) __attribute__((
196 deprecated(
"LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
198 void removeLink(
const std::string& name)
205 #if !SST_BUILDING_CORE
207 deprecated(
"LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
218 std::map<std::string, Link*>::iterator it = linkMap.find(name);
219 if ( it == linkMap.end() )
229 #if !SST_BUILDING_CORE
231 deprecated("
LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
236 return linkMap.empty();
242 #if !SST_BUILDING_CORE
244 deprecated("
LinkMap class was not intended to be used outside of SST Core and will be removed in SST 12.")))
255 #endif // SST_CORE_LINKMAP_H
Maps port names to the Links that are connected to it.
Definition: linkMap.h:27
void insertLink(const std::string &name, Link *link)
Inserts a new pair of name and link into the map.
Definition: linkMap.h:185
void addSelfPort(const std::string &name)
Set the list of allowed port names from the ElementInfoPort.
Definition: linkMap.h:159
bool empty()
Checks to see if LinkMap is empty.
Definition: linkMap.h:230
Link * getLink(const std::string &name)
Returns a Link pointer for a given name.
Definition: linkMap.h:206
std::map< std::string, Link * > & getLinkMap()
Return a reference to the internal map.
Definition: linkMap.h:243
Link between two components.
Definition: link.h:31