rename files
[iotcloud.git] / version2 / src / C / SlotIndexer.cc
diff --git a/version2/src/C/SlotIndexer.cc b/version2/src/C/SlotIndexer.cc
deleted file mode 100644 (file)
index b49ca45..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "SlotIndexer.h"
-#include "Slot.h"
-#include "Error.h"
-#include "SlotBuffer.h"
-/**
- * Slot indexer allows slots in both the slot buffer and the new
- * server response to looked up in a consistent fashion.
- * @author Brian Demsky
- * @version 1.0
- */
-
-SlotIndexer::SlotIndexer(Array<Slot *> *_updates, SlotBuffer *_buffer) :
-       updates(_updates),
-       buffer(_buffer),
-       firstslotseqnum(updates->get(0)->getSequenceNumber()) {
-}
-
-Slot *SlotIndexer::getSlot(int64_t seqnum) {
-       if (seqnum >= firstslotseqnum) {
-               int32_t offset = (int32_t) (seqnum - firstslotseqnum);
-               if (((uint32_t)offset) >= updates->length())
-                       throw new Error("Invalid Slot Sequence Number Reference");
-               else
-                       return updates->get(offset);
-       } else
-               return buffer->getSlot(seqnum);
-}