00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef SST_COMPEVENT_H
00014 #define SST_COMPEVENT_H
00015
00016 #include <deque>
00017
00018 #include <sst/core/event.h>
00019
00020 namespace SST {
00021
00022 #define _CE_DBG( fmt, args...) __DBG( DBG_COMPEVENT, CompEvent, fmt, ## args )
00023
00024 class Link;
00025
00026 class CompEvent : public Event
00027 {
00028 public:
00029 CompEvent() {}
00030
00031 void SetCycle( Cycle_t _cycle ) { cycle = _cycle; }
00032 void SetLinkPtr( Link* link ) { linkPtr = (unsigned long) link; }
00033 SimTime_t Cycle() { return cycle; }
00034 Link* LinkPtr() { return (Link*) linkPtr; }
00035
00036 private:
00037 CompEvent( const CompEvent& e );
00038
00039 SimTime_t cycle;
00040
00041 unsigned long linkPtr;
00042
00043 friend class boost::serialization::access;
00044 template<class Archive>
00045 void
00046 serialize(Archive & ar, const unsigned int version )
00047 {
00048 boost::serialization::base_object<Event>(*this);
00049 ar & BOOST_SERIALIZATION_NVP( cycle );
00050 ar & BOOST_SERIALIZATION_NVP( linkPtr );
00051 }
00052 };
00053
00054 typedef std::deque<CompEvent*> CompEventQueue_t;
00055
00056 }
00057
00058 #endif // SST_COMPEVENT_H