00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef SST_SYNCQUEUE_H
00014 #define SST_SYNCQUEUE_H
00015
00016 #include <vector>
00017
00018 #include <sst/core/activityQueue.h>
00019
00020 namespace SST {
00021
00022 class SyncQueue : public ActivityQueue {
00023 public:
00024 SyncQueue();
00025 ~SyncQueue();
00026
00027 bool empty();
00028 int size();
00029 void insert(Activity* activity);
00030 Activity* pop();
00031 Activity* front();
00032
00033
00034 void clear();
00035 std::vector<Activity*>* getVector();
00036
00037 private:
00038 std::vector<Activity*> data;
00039
00040 friend class boost::serialization::access;
00041 template<class Archive>
00042 void
00043 serialize(Archive & ar, const unsigned int version )
00044 {
00045 printf("begin SyncQueue::serialize\n");
00046 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(ActivityQueue);
00047 printf(" - SyncQueue::data\n");
00048 ar & BOOST_SERIALIZATION_NVP(data);
00049 printf("end SyncQueue::serialize\n");
00050 }
00051 };
00052
00053 }
00054
00055 BOOST_CLASS_EXPORT_KEY(SST::SyncQueue)
00056
00057 #endif // SST_SYNCQUEUE_H