VMware GemFire Native C++ Reference  9.1
PdxInstanceFactory.hpp
1 #pragma once
2 
3 #ifndef GEODE_PDXINSTANCEFACTORY_H_
4 #define GEODE_PDXINSTANCEFACTORY_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 "PdxInstance.hpp"
24 #include "geode_globals.hpp"
25 #include "geode_types.hpp"
26 #include "CacheableBuiltins.hpp"
27 #include "CacheableDate.hpp"
28 #include "CacheableObjectArray.hpp"
29 
30 namespace apache {
31 namespace geode {
32 namespace client {
33 
46  public:
50  virtual ~PdxInstanceFactory() {}
51 
52  protected:
57 
58  private:
59  // never implemented.
61  void operator=(const PdxInstanceFactory& other);
62 
63  public:
71  virtual PdxInstancePtr create() = 0;
72 
83  virtual PdxInstanceFactoryPtr writeWideChar(const char* fieldName,
84  wchar_t value) = 0;
85 
96  virtual PdxInstanceFactoryPtr writeChar(const char* fieldName,
97  char value) = 0;
98 
109  virtual PdxInstanceFactoryPtr writeBoolean(const char* fieldName,
110  bool value) = 0;
111 
122  virtual PdxInstanceFactoryPtr writeByte(const char* fieldName,
123  int8_t value) = 0;
124 
135  virtual PdxInstanceFactoryPtr writeShort(const char* fieldName,
136  int16_t value) = 0;
137 
148  virtual PdxInstanceFactoryPtr writeInt(const char* fieldName,
149  int32_t value) = 0;
150 
161  virtual PdxInstanceFactoryPtr writeLong(const char* fieldName,
162  int64_t value) = 0;
163 
174  virtual PdxInstanceFactoryPtr writeFloat(const char* fieldName,
175  float value) = 0;
176 
187  virtual PdxInstanceFactoryPtr writeDouble(const char* fieldName,
188  double value) = 0;
189 
200  virtual PdxInstanceFactoryPtr writeDate(const char* fieldName,
201  CacheableDatePtr value) = 0;
202 
213  virtual PdxInstanceFactoryPtr writeWideString(const char* fieldName,
214  const wchar_t* value) = 0;
215 
226  virtual PdxInstanceFactoryPtr writeString(const char* fieldName,
227  const char* value) = 0;
228 
246  virtual PdxInstanceFactoryPtr writeObject(const char* fieldName,
247  CacheablePtr value) = 0;
248 
260  virtual PdxInstanceFactoryPtr writeBooleanArray(const char* fieldName,
261  bool* value,
262  int32_t length) = 0;
263 
275  virtual PdxInstanceFactoryPtr writeWideCharArray(const char* fieldName,
276  wchar_t* value,
277  int32_t length) = 0;
278 
290  virtual PdxInstanceFactoryPtr writeCharArray(const char* fieldName,
291  char* value, int32_t length) = 0;
292 
304  virtual PdxInstanceFactoryPtr writeByteArray(const char* fieldName,
305  int8_t* value,
306  int32_t length) = 0;
307 
319  virtual PdxInstanceFactoryPtr writeShortArray(const char* fieldName,
320  int16_t* value,
321  int32_t length) = 0;
322 
334  virtual PdxInstanceFactoryPtr writeIntArray(const char* fieldName,
335  int32_t* value,
336  int32_t length) = 0;
337 
349  virtual PdxInstanceFactoryPtr writeLongArray(const char* fieldName,
350  int64_t* value,
351  int32_t length) = 0;
352 
364  virtual PdxInstanceFactoryPtr writeFloatArray(const char* fieldName,
365  float* value,
366  int32_t length) = 0;
367 
379  virtual PdxInstanceFactoryPtr writeDoubleArray(const char* fieldName,
380  double* value,
381  int32_t length) = 0;
382 
394  virtual PdxInstanceFactoryPtr writeStringArray(const char* fieldName,
395  char** value,
396  int32_t length) = 0;
397 
409  virtual PdxInstanceFactoryPtr writeWideStringArray(const char* fieldName,
410  wchar_t** value,
411  int32_t length) = 0;
412 
427  virtual PdxInstanceFactoryPtr writeObjectArray(
428  const char* fieldName, CacheableObjectArrayPtr value) = 0;
429 
443  virtual PdxInstanceFactoryPtr writeArrayOfByteArrays(
444  const char* fieldName, int8_t** value, int32_t arrayLength,
445  int32_t* elementLength) = 0;
446 
470  virtual PdxInstanceFactoryPtr markIdentityField(const char* fieldName) = 0;
471 };
472 } // namespace client
473 } // namespace geode
474 } // namespace apache
475 
476 #endif // GEODE_PDXINSTANCEFACTORY_H_
PdxInstanceFactory gives you a way to create PdxInstances.
Definition: PdxInstanceFactory.hpp:45
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
virtual ~PdxInstanceFactory()
destructor
Definition: PdxInstanceFactory.hpp:50
Contains generic template definitions for Cacheable types and instantiations for built-in types...
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
PdxInstanceFactory()
constructors
Definition: PdxInstanceFactory.hpp:56
This namespace contains all the Geode C++ API classes, enumerations and globals.

Pivotal GemFire C++ Cache API Documentation