edits
[iotcloud.git] / version2 / src / C / TableStatus.h
1 #ifndef TABLESTATUS_H
2 #define TABLESTATUS_H
3 #include "common.h"
4 #include "Entry.h"
5
6 /**
7  * TableStatus entries record the current size of the data structure
8  * in slots.  Used to remember the size and to perform resizes.
9  * @author Brian Demsky
10  * @version 1.0
11  */
12
13 class TableStatus : public Entry {
14  private:
15         int maxslots;
16
17  public:
18  TableStatus(Slot * slot, int _maxslots) : Entry(slot),
19                 maxslots(_maxslots) {
20                 }
21         int getMaxSlots() { return maxslots; }
22         void encode(ByteBuffer *bb);
23         int getSize() { return sizeof(int32_t)+sizeof(char); }
24         
25         char getType() { return TypeTableStatus; }
26         
27         Entry * getCopy(Slot * s) { return new TableStatus(s, maxslots); }
28 };
29
30 Entry * TableStatus_decode(Slot * slot, ByteBuffer * bb);
31 #endif