TargetNodesMap.cpp

Go to the documentation of this file.
00001 #include "TargetNodesMap.h"
00002 
00003 
00004 TargetNodesMap::TargetNodesMap()
00005 {}
00006 
00007 TargetNodesMap::~TargetNodesMap()
00008 {}
00009 
00010 
00011 void TargetNodesMap::addTargetNode(local_objectid_t oid, nodeid_t node, engineid_t eng)
00012 {
00013     if (eng >= _map.size())
00014         _map.resize(eng+1);
00015     if (oid >= _map[eng].size())
00016         _map[eng].resize(oid+1);
00017     _map[eng][oid].insert(node);
00018 }
00019 
00020 bool TargetNodesMap::hasNodes(local_objectid_t oid, engineid_t eng)
00021 {
00022     return _map.size() > eng && _map[eng].size() > oid && _map[eng][oid].size() > 0 ;
00023 }
00024 
00025 TargetNodesMap::const_iterator TargetNodesMap::begin(local_objectid_t oid, engineid_t eng)
00026 {
00027     return _map[eng][oid].begin();
00028 }
00029 
00030 TargetNodesMap::const_iterator TargetNodesMap::end(local_objectid_t oid, engineid_t eng)
00031 {
00032     return _map[eng][oid].end();
00033 }

Generated on Wed Jul 9 16:34:38 2008 for PCSIM by  doxygen 1.5.5