Apache Geode Native C++ Reference 1.15.0
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:
42 ~WritablePdxInstance() noexcept override = default;
43
58 virtual void setField(const std::string& fieldName,
59 std::shared_ptr<Cacheable> value) = 0;
60
74 virtual void setField(const std::string& fieldName, bool value) = 0;
75
93 virtual void setField(const std::string& fieldName, signed char value) = 0;
94
112 virtual void setField(const std::string& fieldName, unsigned char value) = 0;
113
127 virtual void setField(const std::string& fieldName, int16_t value) = 0;
128
142 virtual void setField(const std::string& fieldName, int32_t value) = 0;
143
157 virtual void setField(const std::string& fieldName, int64_t value) = 0;
158
172 virtual void setField(const std::string& fieldName, float value) = 0;
173
187 virtual void setField(const std::string& fieldName, double value) = 0;
188
202 virtual void setField(const std::string& fieldName, char16_t value) = 0;
203
219 virtual void setField(const std::string& fieldName,
220 std::shared_ptr<CacheableDate> value) = 0;
221
235 virtual void setField(const std::string& fieldName,
236 const std::vector<bool>& value) = 0;
237
251 virtual void setField(const std::string& fieldName,
252 const std::vector<int8_t>& value) = 0;
253
267 virtual void setField(const std::string& fieldName,
268 const std::vector<int16_t>& value) = 0;
269
283 virtual void setField(const std::string& fieldName,
284 const std::vector<int32_t>& value) = 0;
285
299 virtual void setField(const std::string& fieldName,
300 const std::vector<int64_t>& value) = 0;
301
315 virtual void setField(const std::string& fieldName,
316 const std::vector<float>& value) = 0;
317
331 virtual void setField(const std::string& fieldName,
332 const std::vector<double>& value) = 0;
333
347 virtual void setField(const std::string& fieldName,
348 const std::string& value) = 0;
349
363 virtual void setField(const std::string& fieldName,
364 const std::vector<char16_t>& value) = 0;
365
381 virtual void setField(const std::string& fieldName, std::string* value,
382 int32_t length) = 0;
383
401 virtual void setField(const std::string& fieldName, int8_t** value,
402 int32_t arrayLength, int32_t* elementLength) = 0;
403
419 virtual void setField(const std::string& fieldName,
420 std::shared_ptr<CacheableObjectArray> value) = 0;
421
422 protected:
427
428 private:
429 WritablePdxInstance(const WritablePdxInstance& other) = delete;
430 void operator=(const WritablePdxInstance& other) = delete;
431};
432} // namespace client
433} // namespace geode
434} // namespace apache
435
436#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.

Apache Geode C++ Cache API Documentation