00001 #ifndef SPIKETARGETGROUPPOOL_H_ 00002 #define SPIKETARGETGROUPPOOL_H_ 00003 00004 #include "SimObject.h" 00005 00006 #include <list> 00007 using std::list; 00008 00009 #include <vector> 00010 using std::vector; 00011 00012 class SpikeTargetGroupPool 00013 { 00014 public: 00015 00016 struct SpikeTarget 00017 { 00018 SpikeTarget( ): receiver(NULL), port(0) {}; 00019 SpikeTarget( SimObject* r, spikeport_t p ): receiver(r), port(p) {}; 00020 SimObject *receiver ; 00021 spikeport_t port ; 00022 }; 00023 00024 typedef list<SpikeTarget> SpikeTargetContainer; 00025 typedef SpikeTargetContainer::const_iterator const_iterator ; 00026 00027 SpikeTargetGroupPool(); 00028 virtual ~SpikeTargetGroupPool(); 00029 00030 spikegroupid_t addSpikeTarget( SimObject *receiver, spikeport_t port ); 00031 00032 spikegroupid_t addSpikeTarget( spikegroupid_t group, SimObject *receiver, spikeport_t port ); 00033 00034 const_iterator beginSpikeTargetGroup(spikegroupid_t group) 00035 { 00036 return pool[group].begin(); 00037 } 00038 00039 const_iterator endSpikeTargetGroup(spikegroupid_t group) 00040 { 00041 return pool[group].end(); 00042 } 00043 00044 protected : 00045 vector<SpikeTargetContainer> pool; 00046 00047 }; 00048 00049 #endif /*SPIKERECEIVINGGROUPS_H_*/