Pivotal GemFire Native C++ Reference  10.1.3
PdxReader.hpp
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #pragma once
19 
20 #ifndef GEODE_PDXREADER_H_
21 #define GEODE_PDXREADER_H_
22 
23 #include "CacheableBuiltins.hpp"
24 #include "PdxUnreadFields.hpp"
25 
26 namespace apache {
27 namespace geode {
28 namespace client {
29 
30 class CacheableDate;
31 class CacheableObjectArray;
32 class PdxReader;
33 class PdxSerializer;
34 
58 class APACHE_GEODE_EXPORT PdxReader {
59  public:
63  PdxReader() {}
64 
68  virtual ~PdxReader() {}
69 
79  virtual char16_t readChar(const std::string& fieldName) = 0;
80 
90  virtual bool readBoolean(const std::string& fieldName) = 0;
91 
101  virtual int8_t readByte(const std::string& fieldName) = 0;
102 
112  virtual int16_t readShort(const std::string& fieldName) = 0;
113 
123  virtual int32_t readInt(const std::string& fieldName) = 0;
124 
134  virtual int64_t readLong(const std::string& fieldName) = 0;
135 
145  virtual float readFloat(const std::string& fieldName) = 0;
146 
156  virtual double readDouble(const std::string& fieldName) = 0;
157 
168  virtual std::string readString(const std::string& fieldName) = 0;
169 
179  virtual std::shared_ptr<Cacheable> readObject(
180  const std::string& fieldName) = 0;
181 
192  virtual std::vector<char16_t> readCharArray(const std::string& fieldName) = 0;
193 
203  virtual std::vector<bool> readBooleanArray(const std::string& fieldName) = 0;
204 
215  virtual std::vector<int8_t> readByteArray(const std::string& fieldName) = 0;
216 
228  virtual std::vector<int16_t> readShortArray(const std::string& fieldName) = 0;
229 
241  virtual std::vector<int32_t> readIntArray(const std::string& fieldName) = 0;
242 
254  virtual std::vector<int64_t> readLongArray(const std::string& fieldName) = 0;
255 
266  virtual std::vector<float> readFloatArray(const std::string& fieldName) = 0;
267 
278  virtual std::vector<double> readDoubleArray(const std::string& fieldName) = 0;
279 
290  virtual std::vector<std::string> readStringArray(
291  const std::string& fieldName) = 0;
292 
303  virtual std::shared_ptr<CacheableObjectArray> readObjectArray(
304  const std::string& fieldName) = 0;
305 
319  virtual int8_t** readArrayOfByteArrays(const std::string& fieldName,
320  int32_t& arrayLength,
321  int32_t** elementLength) = 0;
322 
333  virtual std::shared_ptr<CacheableDate> readDate(
334  const std::string& fieldName) = 0;
335 
344  virtual bool hasField(const std::string& fieldName) = 0;
345 
357  virtual bool isIdentityField(const std::string& fieldName) = 0;
358 
369  virtual std::shared_ptr<PdxUnreadFields> readUnreadFields() = 0;
370 
371  virtual std::shared_ptr<PdxSerializer> getPdxSerializer() const = 0;
372 };
373 } // namespace client
374 } // namespace geode
375 } // namespace apache
376 
377 #endif // GEODE_PDXREADER_H_
apache::geode::client::PdxReader::PdxReader
PdxReader()
constructors
Definition: PdxReader.hpp:63
apache::geode::client::PdxReader
A PdxReader will be passed to PdxSerializable.fromData or during deserialization of a PDX.
Definition: PdxReader.hpp:58
CacheableBuiltins.hpp
Contains generic template definitions for Cacheable types and instantiations for built-in types.
apache::geode::client::PdxReader::~PdxReader
virtual ~PdxReader()
destructor
Definition: PdxReader.hpp:68

Apache Geode C++ Cache API Documentation