VMware Tanzu GemFire Native C++ Reference 10.2.7
WritablePdxInstance.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_WRITABLEPDXINSTANCE_H_
21#define GEODE_WRITABLEPDXINSTANCE_H_
22
23#include <memory>
24
25#include "PdxInstance.hpp"
26#include "Serializable.hpp"
27
28namespace apache {
29namespace geode {
30namespace client {
31
32class CacheableObjectArray;
33
40class APACHE_GEODE_EXPORT WritablePdxInstance : public PdxInstance {
41 public:
45 virtual ~WritablePdxInstance() = default;
46
61 virtual void setField(const std::string& fieldName,
62 std::shared_ptr<Cacheable> value) = 0;
63
77 virtual void setField(const std::string& fieldName, bool value) = 0;
78
96 virtual void setField(const std::string& fieldName, signed char value) = 0;
97
115 virtual void setField(const std::string& fieldName, unsigned char value) = 0;
116
130 virtual void setField(const std::string& fieldName, int16_t value) = 0;
131
145 virtual void setField(const std::string& fieldName, int32_t value) = 0;
146
160 virtual void setField(const std::string& fieldName, int64_t value) = 0;
161
175 virtual void setField(const std::string& fieldName, float value) = 0;
176
190 virtual void setField(const std::string& fieldName, double value) = 0;
191
205 virtual void setField(const std::string& fieldName, char16_t value) = 0;
206
222 virtual void setField(const std::string& fieldName,
223 std::shared_ptr<CacheableDate> value) = 0;
224
238 virtual void setField(const std::string& fieldName,
239 const std::vector<bool>& value) = 0;
240
254 virtual void setField(const std::string& fieldName,
255 const std::vector<int8_t>& value) = 0;
256
270 virtual void setField(const std::string& fieldName,
271 const std::vector<int16_t>& value) = 0;
272
286 virtual void setField(const std::string& fieldName,
287 const std::vector<int32_t>& value) = 0;
288
302 virtual void setField(const std::string& fieldName,
303 const std::vector<int64_t>& value) = 0;
304
318 virtual void setField(const std::string& fieldName,
319 const std::vector<float>& value) = 0;
320
334 virtual void setField(const std::string& fieldName,
335 const std::vector<double>& value) = 0;
336
350 virtual void setField(const std::string& fieldName,
351 const std::string& value) = 0;
352
366 virtual void setField(const std::string& fieldName,
367 const std::vector<char16_t>& value) = 0;
368
384 virtual void setField(const std::string& fieldName, std::string* value,
385 int32_t length) = 0;
386
404 virtual void setField(const std::string& fieldName, int8_t** value,
405 int32_t arrayLength, int32_t* elementLength) = 0;
406
422 virtual void setField(const std::string& fieldName,
423 std::shared_ptr<CacheableObjectArray> value) = 0;
424
425 protected:
430
431 private:
432 WritablePdxInstance(const WritablePdxInstance& other) = delete;
433 void operator=(const WritablePdxInstance& other) = delete;
434};
435} // namespace client
436} // namespace geode
437} // namespace apache
438
439#endif // GEODE_WRITABLEPDXINSTANCE_H_
PdxInstance provides run time access to the fields of a PDX without deserializing the PDX.
Definition: PdxInstance.hpp:51
WritablePdxInstance is a PdxInstance that also supports field modification using the setField method.
Definition: WritablePdxInstance.hpp:40
virtual void setField(const std::string &fieldName, float value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< float > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, std::shared_ptr< Cacheable > value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< int8_t > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< bool > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, int64_t value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< int16_t > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< char16_t > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, char16_t value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, std::string *value, int32_t length)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, signed char value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, bool value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, unsigned char value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, int32_t value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< double > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< int64_t > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::string &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, int16_t value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, std::shared_ptr< CacheableDate > value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, const std::vector< int32_t > &value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, std::shared_ptr< CacheableObjectArray > value)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, int8_t **value, int32_t arrayLength, int32_t *elementLength)=0
Set the existing named field to the given value.
virtual void setField(const std::string &fieldName, double value)=0
Set the existing named field to the given value.
virtual ~WritablePdxInstance()=default
destructor

Apache Geode C++ Cache API Documentation