VMware GemFire Native Client Cache Reference  9.0.6
PdxSerializer.hpp
1 #ifndef PDXSERIALIZER_HPP_
2 #define PDXSERIALIZER_HPP_
3 
4 /*=========================================================================
5 * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
6  * This product is protected by U.S. and international copyright
7  * and intellectual property laws. Pivotal products are covered by
8  * more patents listed at http://www.pivotal.io/patents.
9 *========================================================================
10 */
11 
12 #include "Serializable.hpp"
13 #include "PdxReader.hpp"
14 #include "PdxWriter.hpp"
15 namespace gemfire {
16 
20  typedef void (*UserDeallocator) (void*, const char*);
21 
25  typedef uint32_t (*UserObjectSizer) (void*, const char*);
26 
27 class CPPCACHE_EXPORT PdxSerializer : public SharedBase {
28 
37 public:
38 
39  PdxSerializer(){}
40 
41  virtual ~PdxSerializer(){}
42 
49  virtual void * fromData(const char * className, PdxReaderPtr pr) = 0;
50 
56  virtual bool toData(void * userObject, const char * className, PdxWriterPtr pw) = 0;
57 
62  virtual UserDeallocator getDeallocator(const char * className) = 0;
63 
68  virtual UserObjectSizer getObjectSizer(const char * className) { return NULL; };
69 
70 };
71 
72 } /* namespace gemfire */
73 #endif /* PDXSERIALIZER_HPP_ */
void(* UserDeallocator)(void *, const char *)
Function pointer type which takes a void pointer to an instance of a user object to delete and class ...
Definition: PdxSerializer.hpp:20
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
uint32_t(* UserObjectSizer)(void *, const char *)
Function pointer type which takes a void pointer to an instance of a user object and class name to re...
Definition: PdxSerializer.hpp:25
#define CPPCACHE_EXPORT
Defines a GemFire CPPCACHE export.
Definition: gf_base.hpp:51
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:31
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:35

GemFire C++ Cache API Documentation