edits
[iotcloud.git] / version2 / src / C / TableStatus.cc
index 10c259c3c3aee5c6aca6401b904c74ddc3753d85..49fcb0f201d1cc67b5caa9fba7e080757c2b6422 100644 (file)
@@ -1,43 +1,12 @@
+#include "TableStatus.h"
+#include "ByteBuffer.h"
 
-/**
- * TableStatus entries record the current size of the data structure
- * in slots.  Used to remember the size and to perform resizes.
- * @author Brian Demsky
- * @version 1.0
- */
-
-
-class TableStatus extends Entry {
-       int maxslots;
-
-       TableStatus(Slot slot, int _maxslots) {
-               super(slot);
-               maxslots=_maxslots;
-       }
-
-       int getMaxSlots() {
-               return maxslots;
-       }
-
-       static Entry decode(Slot slot, ByteBuffer bb) {
-               int maxslots=bb.getInt();
-               return new TableStatus(slot, maxslots);
-       }
-
-       void encode(ByteBuffer bb) {
-               bb.put(Entry.TypeTableStatus);
-               bb.putInt(maxslots);
-       }
-
-       int getSize() {
-               return sizeof(int32_t)+sizeof(char);
-       }
-
-       char getType() {
-               return Entry.TypeTableStatus;
-       }
+Entry * TableStatus_decode(Slot * slot, ByteBuffer * bb) {
+       int maxslots=bb.getInt();
+       return new TableStatus(slot, maxslots);
+}
 
-       Entry getCopy(Slot s) {
-               return new TableStatus(s, maxslots);
-       }
+void TableStatus::encode(ByteBuffer * bb) {
+       bb->put(TypeTableStatus);
+       bb->putInt(maxslots);
 }