build-artifacts/win/product/include/gfcpp/PdxInstanceFactory.hpp

00001 #ifndef __PDXINSTANCE_FACTORY_HPP_
00002 #define __PDXINSTANCE_FACTORY_HPP_
00003 
00004 /*=========================================================================
00005 * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
00006  * This product is protected by U.S. and international copyright
00007  * and intellectual property laws. Pivotal products are covered by
00008  * more patents listed at http://www.pivotal.io/patents.
00009 *========================================================================
00010 */
00011 
00012 #include "PdxInstance.hpp"
00013 #include "gfcpp_globals.hpp"
00014 #include "gf_types.hpp"
00015 #include "CacheableBuiltins.hpp"
00016 #include "CacheableDate.hpp"
00017 #include "CacheableObjectArray.hpp"
00018 
00019 namespace gemfire {
00020 
00029   class CPPCACHE_EXPORT PdxInstanceFactory : public SharedBase
00030   {
00031   public:
00035     virtual ~PdxInstanceFactory(){
00036     }
00037 
00038   protected:
00042     PdxInstanceFactory(){
00043     }
00044 
00045   private:
00046     // never implemented.
00047     PdxInstanceFactory(const PdxInstanceFactory& other);
00048     void operator =(const PdxInstanceFactory& other);
00049 
00050   public:
00058     virtual PdxInstancePtr create() = 0;
00059 
00069     virtual PdxInstanceFactoryPtr writeWideChar(const char* fieldName, wchar_t value) = 0;
00070 
00080     virtual PdxInstanceFactoryPtr writeChar(const char* fieldName, char value) = 0;
00081 
00091     virtual PdxInstanceFactoryPtr writeBoolean(const char* fieldName, bool value) = 0;
00092 
00102     virtual PdxInstanceFactoryPtr writeByte(const char* fieldName, int8_t value) = 0;
00103 
00113     virtual PdxInstanceFactoryPtr writeShort(const char* fieldName, int16_t value) = 0;
00114 
00124     virtual PdxInstanceFactoryPtr writeInt(const char* fieldName, int32_t value) = 0;
00125 
00135     virtual PdxInstanceFactoryPtr writeLong(const char* fieldName, int64_t value) = 0;
00136 
00146     virtual PdxInstanceFactoryPtr writeFloat(const char* fieldName, float value) = 0;
00147 
00157     virtual PdxInstanceFactoryPtr writeDouble(const char* fieldName, double value) = 0;
00158 
00168     virtual PdxInstanceFactoryPtr writeDate(const char* fieldName, CacheableDatePtr value) = 0;
00169 
00179     virtual PdxInstanceFactoryPtr writeWideString(const char* fieldName, const wchar_t* value) = 0;
00180 
00190     virtual PdxInstanceFactoryPtr writeString(const char* fieldName, const char* value) = 0;
00191 
00207     virtual PdxInstanceFactoryPtr writeObject(const char* fieldName, CacheablePtr value) = 0;    
00208 
00219     virtual PdxInstanceFactoryPtr writeBooleanArray(const char* fieldName, bool* value, int32_t length) = 0;
00220 
00231     virtual PdxInstanceFactoryPtr writeWideCharArray(const char* fieldName, wchar_t* value, int32_t length) = 0;
00232 
00243     virtual PdxInstanceFactoryPtr writeCharArray(const char* fieldName, char* value, int32_t length) = 0;
00244 
00255     virtual PdxInstanceFactoryPtr writeByteArray(const char* fieldName, int8_t* value, int32_t length) = 0;
00256 
00267     virtual PdxInstanceFactoryPtr writeShortArray(const char* fieldName, int16_t* value, int32_t length) = 0;
00268 
00279     virtual PdxInstanceFactoryPtr writeIntArray(const char* fieldName, int32_t* value, int32_t length) = 0;
00280 
00291     virtual PdxInstanceFactoryPtr writeLongArray(const char* fieldName, int64_t* value, int32_t length) = 0;
00292 
00303     virtual PdxInstanceFactoryPtr writeFloatArray(const char* fieldName, float* value, int32_t length) = 0;
00304 
00315     virtual PdxInstanceFactoryPtr writeDoubleArray(const char* fieldName, double* value, int32_t length) = 0;
00316 
00327     virtual PdxInstanceFactoryPtr writeStringArray(const char* fieldName, char** value, int32_t length) = 0;
00328 
00339     virtual PdxInstanceFactoryPtr writeWideStringArray(const char* fieldName, wchar_t** value, int32_t length) = 0;
00340 
00352     virtual PdxInstanceFactoryPtr writeObjectArray(const char* fieldName, CacheableObjectArrayPtr value) = 0;    
00353 
00365     virtual PdxInstanceFactoryPtr writeArrayOfByteArrays(const char* fieldName, int8_t** value, int32_t arrayLength, int32_t* elementLength) = 0;
00366     
00385     virtual PdxInstanceFactoryPtr markIdentityField(const char* fieldName) = 0;
00386 
00387   };
00388 }
00389 
00390 #endif /* __PDXINSTANCE_FACTORY_HPP_ */

GemFire C++ Cache API Documentation