edits
[iotcloud.git] / version2 / src / C / ArbitrationRound.h
index 7ef4a2eacf54ffc709171e13818baae9c04675bc..da1a2a8a2186e14e8b033401e9f250bee636bd3e 100644 (file)
@@ -2,30 +2,32 @@
 #define ARBITRATIONROUND_H
 
 #define MAX_PARTS 10
+#include "common.h"
 
 class ArbitrationRound {
  private:
-  Set<Abort *> * abortsBefore = NULL;
-  List<Entry *> * parts = NULL;
-  Commit commit = NULL;
-  int currentSize = 0;
-  bool didSendPart = false;
-  bool didGenerateParts = false;
+  Hashset<Abort *> * abortsBefore;
+  Vector<Entry *> * parts;
+  Commit * commit;
+  int currentSize;
+  bool didSendPart;
+  bool didGenerateParts;
 
  public:
-  ArbitrationRound(Commit * _commit, Set<Abort *> * _abortsBefore);
+  ArbitrationRound(Commit * _commit, Hashset<Abort *> * _abortsBefore);
+       ~ArbitrationRound();
   void generateParts();
-  List<Entry> * getParts();
-  void removeParts(List<Entry> * removeParts);
+  Vector<Entry *> * getParts();
+  void removeParts(Vector<Entry *> * removeParts);
   bool isDoneSending();
   void setCommit(Commit * _commit);
   void addAbort(Abort * abort);
-  void addAborts(Set<Abort *> * aborts);
-  Set<Abort *> * getAborts();
+  void addAborts(Hashset<Abort *> * aborts);
+  Hashset<Abort *> * getAborts();
   int getAbortsCount();
   int getCurrentSize();
   bool isFull();
-  bool didSendPart();
+  bool getDidSendPart();
 };
 
 #endif