12 #ifndef SST_CORE_LINKMAP_H    13 #define SST_CORE_LINKMAP_H    15 #include <sst/core/sst_types.h>    20 #include <sst/core/component.h>    21 #include <sst/core/link.h>    31     std::map<std::string,Link*> linkMap;
    32     const std::vector<std::string> * allowedPorts;
    33     std::vector<std::string> selfPorts;
   122     LinkMap() : allowedPorts(NULL) {}
   125         for ( std::map<std::string,Link*>::iterator it = linkMap.begin(); it != linkMap.end(); ++it ) {
   145         selfPorts.push_back(name);
   148     bool isSelfPort(
const std::string& name)
 const {
   149         for ( std::vector<std::string>::const_iterator i = selfPorts.begin() ; i != selfPorts.end() ; ++i ) {
   161         linkMap.insert(std::pair<std::string,Link*>(name,link));
   171         std::map<std::string,Link*>::iterator it = linkMap.find(name);
   172         if ( it == linkMap.end() ) 
return NULL;
   173         else return it->second;
   181         return linkMap.empty();
   195 #endif // SST_CORE_LINKMAP_H Maps port names to the Links that are connected to it. 
Definition: linkMap.h:28
std::map< std::string, Link * > & getLinkMap()
Return a reference to the internal map. 
Definition: linkMap.h:187
Link * getLink(std::string name)
Returns a Link pointer for a given name. 
Definition: linkMap.h:165
void addSelfPort(std::string &name)
Add a port name to the list of allowed ports. 
Definition: linkMap.h:143
bool empty()
Checks to see if LinkMap is empty. 
Definition: linkMap.h:180
void insertLink(std::string name, Link *link)
Inserts a new pair of name and link into the map. 
Definition: linkMap.h:160
void setAllowedPorts(const std::vector< std::string > *p)
Set the list of allowed port names from the ElementInfoPort. 
Definition: linkMap.h:134
Link between two components. 
Definition: link.h:33