build-artifacts/win/product/include/gfcpp/PdxSerializer.hpp

00001 #ifndef PDXSERIALIZER_HPP_
00002 #define PDXSERIALIZER_HPP_
00003 
00004 /*=========================================================================
00005 * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
00006  * This product is protected by U.S. and international copyright
00007  * and intellectual property laws. Pivotal products are covered by
00008  * more patents listed at http://www.pivotal.io/patents.
00009 *========================================================================
00010 */
00011 
00012 #include "Serializable.hpp"
00013 #include "PdxReader.hpp"
00014 #include "PdxWriter.hpp"
00015 namespace gemfire {
00016 
00020   typedef void (*UserDeallocator) (void*, const char*);
00021 
00025   typedef uint32_t (*UserObjectSizer) (void*, const char*);
00026 
00027 class CPPCACHE_EXPORT PdxSerializer : public SharedBase {
00028 
00037 public:
00038 
00039   PdxSerializer(){}
00040 
00041   virtual ~PdxSerializer(){}
00042 
00049   virtual void * fromData(const char * className, PdxReaderPtr pr) = 0;
00050 
00056   virtual bool toData(void * userObject, const char * className, PdxWriterPtr pw) = 0;
00057 
00062   virtual UserDeallocator getDeallocator(const char * className) = 0;
00063 
00068   virtual UserObjectSizer getObjectSizer(const char * className) { return NULL; };
00069 
00070 };
00071 
00072 } /* namespace gemfire */
00073 #endif /* PDXSERIALIZER_HPP_ */

GemFire C++ Cache API Documentation