00001 /* Copyright (C) GridGain Systems. All Rights Reserved. */ 00002 00003 /* _________ _____ __________________ _____ 00004 * __ ____/___________(_)______ /__ ____/______ ____(_)_______ 00005 * _ / __ __ ___/__ / _ __ / _ / __ _ __ `/__ / __ __ \ 00006 * / /_/ / _ / _ / / /_/ / / /_/ / / /_/ / _ / _ / / / 00007 * \____/ /_/ /_/ \_,__/ \____/ \__,_/ /_/ /_/ /_/ 00008 */ 00009 00010 #ifndef GRID_CLIENT_VARIANT_HASHEABLE_OBJECT_HPP_INCLUDED 00011 #define GRID_CLIENT_VARIANT_HASHEABLE_OBJECT_HPP_INCLUDED 00012 00013 #include <vector> 00014 00015 #include "gridgain/gridhasheableobject.hpp" 00016 #include "gridgain/gridclientvariant.hpp" 00017 00021 class GridClientVariantHasheableObject : public GridClientHasheableObject { 00022 public: 00028 GridClientVariantHasheableObject(const GridClientVariant& var); 00029 00036 GridClientVariantHasheableObject(const GridClientVariant& var, int calculatedHashCode); 00037 00043 virtual int32_t hashCode() const { return hashCode_; } 00044 00050 virtual void convertToBytes(std::vector<int8_t>& opBytes) const { 00051 opBytes = bytes; 00052 } 00053 protected: 00059 void init(const GridClientVariant& var); 00060 00062 int32_t hashCode_; 00063 00065 std::vector<int8_t> bytes; 00066 }; 00067 00068 #endif
1.7.1