00001 #ifndef __GEMFIRE_PDXSERIALIZABLE_H__
00002 #define __GEMFIRE_PDXSERIALIZABLE_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "CacheableKey.hpp"
00013
00014 namespace gemfire
00015 {
00016
00017 typedef PdxSerializable* ( *PdxTypeFactoryMethod ) ();
00018
00019 class CPPCACHE_EXPORT PdxSerializable : public CacheableKey
00020 {
00021
00022 public:
00023
00024 PdxSerializable();
00025 virtual ~PdxSerializable();
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 virtual void toData( PdxWriterPtr output ) = 0;
00044
00049 virtual void fromData( PdxReaderPtr input ) = 0;
00050
00059 virtual int8_t typeId( ) const;
00060
00062 virtual bool operator==( const CacheableKey& other ) const;
00063
00065 virtual uint32_t hashcode( ) const;
00066
00070 virtual void toData( DataOutput& output ) const;
00071
00076 virtual Serializable* fromData( DataInput& input );
00077
00083 virtual int32_t classId( ) const { return 0x10; }
00084
00094 virtual CacheableStringPtr toString() const;
00095
00099 virtual const char* getClassName()const = 0;
00100 };
00101 }
00102
00103 #endif