AnalogDelayObjectMap.cpp

Go to the documentation of this file.
00001 #include "AnalogDelayObjectMap.h"
00002 #include <utility>
00003 
00004 using std::pair;
00005 using std::make_pair;
00006 
00007 AnalogDelayObjectMap::AnalogDelayObjectMap()
00008 {}
00009 
00010 AnalogDelayObjectMap::~AnalogDelayObjectMap()
00011 {}
00012 
00013 AnalogDelayObject *
00014 AnalogDelayObjectMap::find(SimObject *owner, int port)
00015 {
00016         port_maptype::const_iterator find_iter;
00017     if ( (find_iter = port_map.find(make_pair(owner,port))) != port_map.end() ) {
00018         return find_iter->second;
00019     }
00020     return NULL;
00021 }
00022 
00023 void AnalogDelayObjectMap::insert(SimObject *owner, int port, AnalogDelayObject *delayObject)
00024 {       
00025         port_map.insert(make_pair(make_pair(owner, port), delayObject));
00026 }
00027 
00028 AnalogDelayObject *
00029 AnalogDelayObjectMap::find(SimObject *owner, string fieldname)
00030 {
00031         field_maptype::const_iterator find_iter;
00032     if ( (find_iter = field_map.find(make_pair(owner,fieldname))) != field_map.end() ) {
00033         return find_iter->second;       
00034     }
00035     return NULL;
00036 }
00037 
00038 void AnalogDelayObjectMap::insert(SimObject *owner, string fieldname, AnalogDelayObject *delayObject)
00039 {
00040         field_map.insert(make_pair(make_pair(owner,fieldname),delayObject));
00041 }

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