Pivotal GemFire Native Client Cache Reference  9.0.6
Serializable.hpp
Go to the documentation of this file.
1 #ifndef __GEMFIRE_SERIALIZABLE_H__
2 #define __GEMFIRE_SERIALIZABLE_H__
3 /*=========================================================================
4  * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
5  * This product is protected by U.S. and international copyright
6  * and intellectual property laws. Pivotal products are covered by
7  * more patents listed at http://www.pivotal.io/patents.
8  *========================================================================
9  */
10 
15 #include "gfcpp_globals.hpp"
16 #include "gf_types.hpp"
17 
18 namespace gemfire
19 {
20 
21 class DataOutput;
22 class DataInput;
23 
24 typedef void ( *CliCallbackMethod) ();
25 
30 typedef Serializable* ( *TypeFactoryMethod ) ();
31 
32 typedef PdxSerializable* ( *TypeFactoryMethodPdx ) ();
40 {
41 
42 public:
43 
47  virtual void toData( DataOutput& output ) const = 0;
48 
53  virtual Serializable* fromData( DataInput& input ) = 0;
54 
63  virtual int32_t classId( ) const = 0;
64 
73  virtual int8_t typeId( ) const;
74 
82  virtual int8_t DSFID( ) const;
83 
92  virtual uint32_t objectSize() const;
93 
102  static void registerType( TypeFactoryMethod creationFunction );
103 
110  static void registerPdxType( TypeFactoryMethodPdx creationFunction );
111 
116  static void registerPdxSerializer( PdxSerializerPtr pdxSerializer );
117 
127  virtual CacheableStringPtr toString( ) const;
128 
134  template< class PRIM >
135  inline static SerializablePtr create( const PRIM value );
136 
140  virtual ~Serializable()
141  {}
142 
143 protected:
144 
149 : SharedBase()
150  {}
151 
152 private:
153 
154  // Never defined.
155  Serializable( const Serializable& other );
156  void operator = ( const Serializable& other );
157 
158 };
159 
160 } //namespace gemfire
161 
162 #endif //ifndef __GEMFIRE_SERIALIZABLE_H__
virtual ~Serializable()
destructor
Definition: Serializable.hpp:140
Provide operations for writing primitive data values, byte arrays, strings, Serializable objects to a...
Definition: DataOutput.hpp:62
This namespace contains all the GemFire C++ API classes, enumerations and globals.
Definition: Assert.hpp:19
Serializable()
constructors
Definition: Serializable.hpp:148
This abstract base class is the superclass of all user objects in the cache that can be serialized...
Definition: Serializable.hpp:39
Provide operations for reading primitive data values, byte arrays, strings, Serializable objects from...
Definition: DataInput.hpp:44
#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
Serializable *(* TypeFactoryMethod)()
signature of functions passed to registerType.
Definition: Serializable.hpp:30

GemFire C++ Cache API Documentation