X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=version2%2Fsrc%2FC%2FEntry.h;h=acdd04a8a0174d431516ac13866a4ee45ab0e054;hb=9c3fa5cbce287df14626d262bd0179e994338869;hp=1ec48b1955d37199b78996ce561f06a1199169b6;hpb=0b9aca2b62c74f68652b170a92271a98d5b96666;p=iotcloud.git diff --git a/version2/src/C/Entry.h b/version2/src/C/Entry.h index 1ec48b1..acdd04a 100644 --- a/version2/src/C/Entry.h +++ b/version2/src/C/Entry.h @@ -8,6 +8,7 @@ */ #include "Liveness.h" +#include "common.h" #define TypeCommitPart 1 #define TypeAbort 2 @@ -16,13 +17,13 @@ #define TypeLastMessage 5 #define TypeRejectedMessage 6 #define TypeTableStatus 7 +#define TypeSlot 8 class Entry : public Liveness { /* Records whether the information is still live or has been superceded by a newer update. */ private: bool islive; - protected: Slot *parentslot; @@ -45,7 +46,6 @@ public: */ virtual void encode(ByteBuffer *bb) = 0; - /** * Returns the size in chars the entry object will take in the char * array. @@ -53,16 +53,11 @@ public: virtual int getSize() = 0; - /** - * Returns a char encoding the type of the entry object. - */ - virtual char getType() = 0; - - /** * Returns a copy of the Entry that can be added to a different slot. */ virtual Entry *getCopy(Slot *s) = 0; + friend Entry *Entry_decode(Slot *slot, ByteBuffer *bb); }; /**