VMware GemFire Native C++ Reference  9.1
PdxWriter.hpp
1 #pragma once
2 
3 #ifndef GEODE_PDXWRITER_H_
4 #define GEODE_PDXWRITER_H_
5 
6 /*
7  * Licensed to the Apache Software Foundation (ASF) under one or more
8  * contributor license agreements. See the NOTICE file distributed with
9  * this work for additional information regarding copyright ownership.
10  * The ASF licenses this file to You under the Apache License, Version 2.0
11  * (the "License"); you may not use this file except in compliance with
12  * the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 
23 #include "geode_globals.hpp"
24 #include "geode_types.hpp"
25 #include "CacheableBuiltins.hpp"
26 #include "CacheableDate.hpp"
27 
28 namespace apache {
29 namespace geode {
30 namespace client {
31 
32 class PdxWriter;
33 typedef SharedPtr<PdxWriter> PdxWriterPtr;
34 
42  public:
46  PdxWriter() {}
47 
51  virtual ~PdxWriter() {}
52 
63  virtual PdxWriterPtr writeChar(const char* fieldName, char value) = 0;
64 
75  virtual PdxWriterPtr writeWideChar(const char* fieldName, wchar_t value) = 0;
76 
87  virtual PdxWriterPtr writeBoolean(const char* fieldName, bool value) = 0;
88 
99  virtual PdxWriterPtr writeByte(const char* fieldName, int8_t value) = 0;
100 
111  virtual PdxWriterPtr writeShort(const char* fieldName, int16_t value) = 0;
112 
123  virtual PdxWriterPtr writeInt(const char* fieldName, int32_t value) = 0;
124 
135  virtual PdxWriterPtr writeLong(const char* fieldName, int64_t value) = 0;
136 
147  virtual PdxWriterPtr writeFloat(const char* fieldName, float value) = 0;
148 
159  virtual PdxWriterPtr writeDouble(const char* fieldName, double value) = 0;
160 
171  virtual PdxWriterPtr writeDate(const char* fieldName,
172  CacheableDatePtr date) = 0;
173 
184  virtual PdxWriterPtr writeString(const char* fieldName,
185  const char* value) = 0;
186 
197  virtual PdxWriterPtr writeWideString(const char* fieldName,
198  const wchar_t* value) = 0;
199 
217  virtual PdxWriterPtr writeObject(const char* fieldName,
218  CacheablePtr value) = 0;
219 
231  virtual PdxWriterPtr writeBooleanArray(const char* fieldName, bool* array,
232  int length) = 0;
233 
245  virtual PdxWriterPtr writeWideCharArray(const char* fieldName, wchar_t* array,
246  int length) = 0;
247 
259  virtual PdxWriterPtr writeCharArray(const char* fieldName, char* array,
260  int length) = 0;
261 
273  virtual PdxWriterPtr writeByteArray(const char* fieldName, int8_t* array,
274  int length) = 0;
275 
287  virtual PdxWriterPtr writeShortArray(const char* fieldName, int16_t* array,
288  int length) = 0;
289 
301  virtual PdxWriterPtr writeIntArray(const char* fieldName, int32_t* array,
302  int length) = 0;
303 
315  virtual PdxWriterPtr writeLongArray(const char* fieldName, int64_t* array,
316  int length) = 0;
317 
329  virtual PdxWriterPtr writeFloatArray(const char* fieldName, float* array,
330  int length) = 0;
331 
343  virtual PdxWriterPtr writeDoubleArray(const char* fieldName, double* array,
344  int length) = 0;
345 
357  virtual PdxWriterPtr writeStringArray(const char* fieldName, char** array,
358  int length) = 0;
359 
371  virtual PdxWriterPtr writeWideStringArray(const char* fieldName,
372  wchar_t** array, int length) = 0;
373 
388  virtual PdxWriterPtr writeObjectArray(const char* fieldName,
389  CacheableObjectArrayPtr array) = 0;
390 
404  virtual PdxWriterPtr writeArrayOfByteArrays(const char* fieldName,
405  int8_t** array, int arrayLength,
406  int* elementLength) = 0;
407 
431  virtual PdxWriterPtr markIdentityField(const char* fieldName) = 0;
432 
445  virtual PdxWriterPtr writeUnreadFields(PdxUnreadFieldsPtr unread) = 0;
446 };
447 } // namespace client
448 } // namespace geode
449 } // namespace apache
450 
451 #endif // GEODE_PDXWRITER_H_
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
PdxWriter()
constructors
Definition: PdxWriter.hpp:46
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
Contains generic template definitions for Cacheable types and instantiations for built-in types...
virtual ~PdxWriter()
destructor
Definition: PdxWriter.hpp:51
Defines a reference counted shared pointer.
Definition: SharedPtr.hpp:52
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:40
A PdxWriter will be passed to PdxSerializable.toData when it is serializing the domain class...
Definition: PdxWriter.hpp:41
This namespace contains all the Geode C++ API classes, enumerations and globals.

Pivotal GemFire C++ Cache API Documentation