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"
32 std::map<std::string, Link*> linkMap;
34 std::vector<std::string> selfPorts;
139 for ( std::map<std::string, Link*>::iterator it = linkMap.begin(); it != linkMap.end(); ++it ) {
157 void addSelfPort(
const std::string& name) { selfPorts.push_back(name); }
159 bool isSelfPort(
const std::string& name)
const
161 for ( std::vector<std::string>::const_iterator i = selfPorts.begin(); i != selfPorts.end(); ++i ) {
172 void insertLink(
const std::string& name,
Link* link) { linkMap.insert(std::pair<std::string, Link*>(name, link)); }
174 void removeLink(
const std::string& name) { linkMap.erase(name); }
185 std::map<std::string, Link*>::iterator it = linkMap.find(name);
186 if ( it == linkMap.end() )
196 bool empty() {
return linkMap.empty(); }
201 std::map<std::string, Link*>&
getLinkMap() {
return linkMap; }
Base serialize class.
Definition serialize.h:110
This class is basically a wrapper for objects to declare the order in which their members should be s...
Definition serializer.h:45
void addSelfPort(const std::string &name)
Set the list of allowed port names from the ElementInfoPort.
Definition linkMap.h:157
std::map< std::string, Link * > & getLinkMap()
Return a reference to the internal map.
Definition linkMap.h:201
Link * getLink(const std::string &name)
Returns a Link pointer for a given name.
Definition linkMap.h:177
void insertLink(const std::string &name, Link *link)
Inserts a new pair of name and link into the map.
Definition linkMap.h:172
bool empty()
Checks to see if LinkMap is empty.
Definition linkMap.h:196
Link between two components.
Definition link.h:55