X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iotcloud.git;a=blobdiff_plain;f=version2%2Fsrc%2FC%2FKeyValue.h;h=f0b0fe2474b430a88bd8d9efbfa60419ee77249a;hp=9234b2dfbcc98a4a295d39670607c05015f58ac8;hb=b7ed1849727b50e226f3b9d1c432d3071d739368;hpb=34ca5d4113dbbd0b5342abd280e2f9e11e7cd3b7 diff --git a/version2/src/C/KeyValue.h b/version2/src/C/KeyValue.h index 9234b2d..f0b0fe2 100644 --- a/version2/src/C/KeyValue.h +++ b/version2/src/C/KeyValue.h @@ -1,6 +1,7 @@ #ifndef KEYVALUE_H #define KEYVALUE_H #include "common.h" +#include "IoTString.h" /** * KeyValue entry for Slot. @@ -28,6 +29,12 @@ public: }; KeyValue *KeyValue_decode(ByteBuffer *bb); -unsigned int hashKeyValue(KeyValue *kv); -bool equalsKeyValue(KeyValue *a, KeyValue *b); + +inline unsigned int hashKeyValue(KeyValue *a) { + return a->getKey()->hashValue(); +} + +inline bool KeyValueEquals(KeyValue *a, KeyValue *b) { + return a->getKey()->equals(b->getKey()); +} #endif