geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [16/31] geode-native git commit: GEODE-2476: Replace gfcpp with geode.
Date Tue, 21 Feb 2017 17:40:29 GMT
http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/DataInput.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/DataInput.hpp b/src/cppcache/include/gfcpp/DataInput.hpp
deleted file mode 100644
index 67d0766..0000000
--- a/src/cppcache/include/gfcpp/DataInput.hpp
+++ /dev/null
@@ -1,1082 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_DATAINPUT_H_
-#define GEODE_GFCPP_DATAINPUT_H_
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "gfcpp_globals.hpp"
-#include "ExceptionTypes.hpp"
-#include <string.h>
-#include "gf_types.hpp"
-#include "Serializable.hpp"
-#include "CacheableString.hpp"
-
-/**
- * @file
- */
-
-#if GF_DEBUG_ASSERTS == 1
-#define DINP_THROWONERROR_DEFAULT true
-#else
-#define DINP_THROWONERROR_DEFAULT false
-#endif
-
-#define checkBufferSize(x) _checkBufferSize(x, __LINE__)
-
-namespace apache {
-namespace geode {
-namespace client {
-
-extern int gf_sprintf(char* buffer, const char* fmt, ...);
-
-/**
- * Provide operations for reading primitive data values, byte arrays,
- * strings, <code>Serializable</code> objects from a byte stream.
- * This class is intentionally not thread safe.
- * @remarks None of the output parameters in the methods below can be NULL
- *   unless otherwise noted.
- */
-class CPPCACHE_EXPORT DataInput {
- public:
-  /**
-   * Read an unsigned byte from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the unsigned byte read from stream
-   */
-  inline void read(uint8_t* value) {
-    checkBufferSize(1);
-    *value = *(m_buf++);
-  }
-
-  /**
-   * Read a signed byte from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the signed byte read from stream
-   */
-  inline void read(int8_t* value) {
-    checkBufferSize(1);
-    *value = *(m_buf++);
-  }
-
-  /**
-   * Read a boolean value from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the boolean read from stream
-   */
-  inline void readBoolean(bool* value) {
-    checkBufferSize(1);
-    *value = (*m_buf == 1 ? true : false);
-    m_buf++;
-  }
-
-  /**
-   * Read the given number of unsigned bytes from the <code>DataInput</code>.
-   * @remarks This method is complimentary to
-   *   <code>DataOutput::writeBytesOnly</code> and, unlike
-   *   <code>readBytes</code>, does not expect the length of array
-   *   in the stream.
-   *
-   * @param buffer array to hold the bytes read from stream
-   * @param len number of unsigned bytes to be read
-   */
-  inline void readBytesOnly(uint8_t* buffer, uint32_t len) {
-    if (len > 0) {
-      checkBufferSize(len);
-      memcpy(buffer, m_buf, len);
-      m_buf += len;
-    }
-  }
-
-  /**
-   * Read the given number of signed bytes from the <code>DataInput</code>.
-   * @remarks This method is complimentary to
-   *   <code>DataOutput::writeBytesOnly</code> and, unlike
-   *   <code>readBytes</code>, does not expect the length of array
-   *   in the stream.
-   *
-   * @param buffer array to hold the bytes read from stream
-   * @param len number of signed bytes to be read
-   */
-  inline void readBytesOnly(int8_t* buffer, uint32_t len) {
-    if (len > 0) {
-      checkBufferSize(len);
-      memcpy(buffer, m_buf, len);
-      m_buf += len;
-    }
-  }
-
-  /**
-   * Read an array of unsigned bytes from the <code>DataInput</code>
-   * expecting to find the length of array in the stream at the start.
-   * @remarks This method is complimentary to
-   *   <code>DataOutput::writeBytes</code>.
-   *
-   * @param bytes output array to hold the bytes read from stream; the array
-   *   is allocated by this method
-   * @param len output parameter to hold the length of array read from stream
-   */
-  inline void readBytes(uint8_t** bytes, int32_t* len) {
-    int32_t length;
-    readArrayLen(&length);
-    *len = length;
-    uint8_t* buffer = NULL;
-    if (length > 0) {
-      checkBufferSize(length);
-      GF_NEW(buffer, uint8_t[length]);
-      memcpy(buffer, m_buf, length);
-      m_buf += length;
-    }
-    *bytes = buffer;
-  }
-
-  /**
-   * Read an array of signed bytes from the <code>DataInput</code>
-   * expecting to find the length of array in the stream at the start.
-   * @remarks This method is complimentary to
-   *   <code>DataOutput::writeBytes</code>.
-   *
-   * @param bytes output array to hold the bytes read from stream; the array
-   *   is allocated by this method
-   * @param len output parameter to hold the length of array read from stream
-   */
-  inline void readBytes(int8_t** bytes, int32_t* len) {
-    int32_t length;
-    readArrayLen(&length);
-    *len = length;
-    int8_t* buffer = NULL;
-    if (length > 0) {
-      checkBufferSize(length);
-      GF_NEW(buffer, int8_t[length]);
-      memcpy(buffer, m_buf, length);
-      m_buf += length;
-    }
-    *bytes = buffer;
-  }
-
-  /**
-   * Read a 16-bit unsigned integer from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the 16-bit unsigned integer
-   *   read from stream
-   */
-  inline void readInt(uint16_t* value) {
-    checkBufferSize(2);
-    uint16_t tmp = *(m_buf++);
-    tmp = static_cast<uint16_t>((tmp << 8) | *(m_buf++));
-    *value = tmp;
-  }
-
-  /**
-   * Read a 32-bit unsigned integer from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the 32-bit unsigned integer
-   *   read from stream
-   */
-  inline void readInt(uint32_t* value) {
-    checkBufferSize(4);
-    uint32_t tmp = *(m_buf++);
-    tmp = (tmp << 8) | *(m_buf++);
-    tmp = (tmp << 8) | *(m_buf++);
-    tmp = (tmp << 8) | *(m_buf++);
-    *value = tmp;
-  }
-
-  /**
-   * Read a 64-bit unsigned integer from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the 64-bit unsigned integer
-   *   read from stream
-   */
-  inline void readInt(uint64_t* value) {
-    checkBufferSize(8);
-    uint64_t tmp;
-    if (sizeof(long) == 8) {
-      tmp = *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-      tmp = (tmp << 8) | *(m_buf++);
-    } else {
-      uint32_t hword = *(m_buf++);
-      hword = (hword << 8) | *(m_buf++);
-      hword = (hword << 8) | *(m_buf++);
-      hword = (hword << 8) | *(m_buf++);
-
-      tmp = hword;
-      hword = *(m_buf++);
-      hword = (hword << 8) | *(m_buf++);
-      hword = (hword << 8) | *(m_buf++);
-      hword = (hword << 8) | *(m_buf++);
-      tmp = (tmp << 32) | hword;
-    }
-    *value = tmp;
-  }
-
-  /**
-   * Read a 16-bit signed integer from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the 16-bit signed integer
-   *   read from stream
-   */
-  inline void readInt(int16_t* value) {
-    checkBufferSize(2);
-    readInt(reinterpret_cast<uint16_t*>(value));
-  }
-
-  /**
-   * Read a 32-bit signed integer from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the 32-bit signed integer
-   *   read from stream
-   */
-  inline void readInt(int32_t* value) {
-    checkBufferSize(4);
-    readInt(reinterpret_cast<uint32_t*>(value));
-  }
-
-  /**
-   * Read a 64-bit signed integer from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the 64-bit signed integer
-   *   read from stream
-   */
-  inline void readInt(int64_t* value) {
-    checkBufferSize(8);
-    readInt(reinterpret_cast<uint64_t*>(value));
-  }
-
-  /**
-   * Read a 32-bit signed integer array length value from the
-   * <code>DataInput</code> in a manner compatible with java server's
-   * <code>DataSerializer.readArrayLength</code>.
-   *
-   * @param len output parameter to hold the 32-bit signed length
-   *   read from stream
-   */
-  inline void readArrayLen(int32_t* len) {
-    uint8_t code;
-    read(&code);
-    if (code == 0xFF) {
-      *len = -1;
-    } else {
-      int32_t result = code;
-      if (result > 252) {  // 252 is java's ((byte)-4 && 0xFF)
-        if (code == 0xFE) {
-          uint16_t val;
-          readInt(&val);
-          result = val;
-        } else if (code == 0xFD) {
-          uint32_t val;
-          readInt(&val);
-          result = val;
-        } else {
-          throw IllegalStateException("unexpected array length code");
-        }
-      }
-      *len = result;
-    }
-  }
-
-  /**
-   * Decode a 64 bit integer as a variable length array.
-   *
-   * This is taken from the varint encoding in protobufs (BSD licensed).
-   * See https://developers.google.com/protocol-buffers/docs/encoding
-   */
-  inline void readUnsignedVL(int64_t* value) {
-    int32_t shift = 0;
-    int64_t result = 0;
-    while (shift < 64) {
-      int8_t b;
-      read(&b);
-      result |= static_cast<int64_t>(b & 0x7F) << shift;
-      if ((b & 0x80) == 0) {
-        *value = result;
-        return;
-      }
-      shift += 7;
-    }
-    throw IllegalStateException("Malformed variable length integer");
-  }
-
-  /**
-   * Read a float from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the float read from stream
-   */
-  inline void readFloat(float* value) {
-    checkBufferSize(4);
-    union float_uint32_t {
-      float f;
-      uint32_t u;
-    } v;
-    readInt(&v.u);
-    *value = v.f;
-  }
-
-  /**
-   * Read a double precision number from the <code>DataInput</code>.
-   *
-   * @param value output parameter to hold the double precision number
-   *   read from stream
-   */
-  inline void readDouble(double* value) {
-    checkBufferSize(8);
-    union double_uint64_t {
-      double d;
-      uint64_t ll;
-    } v;
-    readInt(&v.ll);
-    *value = v.d;
-  }
-
-  /**
-   * free the C string allocated by <code>readASCII</code>,
-   * <code>readASCIIHuge</code>, <code>readUTF</code>,
-   * <code>readUTFHuge</code> methods
-   */
-  static inline void freeUTFMemory(char* value) { delete[] value; }
-
-  /**
-   * free the wide-characted string allocated by <code>readASCII</code>,
-   * <code>readASCIIHuge</code>, <code>readUTF</code>,
-   * <code>readUTFHuge</code> methods
-   */
-  static inline void freeUTFMemory(wchar_t* value) { delete[] value; }
-
-  /**
-   * Allocates a c string buffer, and reads an ASCII string
-   * having maximum length of 64K from <code>DataInput</code> into it.
-   * @remarks Sets integer at length to hold the strlen of the string. Value
-   *   is modified to point to the new allocation. The chars are allocated as
-   *   an array, so the caller must use <code>freeUTFMemory</code> when done.
-   *   Like <code>DataOutput::writeASCII</code> the maximum length supported by
-   *   this method is 64K; use <code>readASCIIHuge</code> or
-   *   <code>readBytes</code> to read strings of length larger than this.
-   *
-   * @param value output C string to hold the read characters; it is allocated
-   *   by this method
-   * @param len output parameter to hold the number of characters read from
-   *   stream; not set if NULL
-   */
-  inline void readASCII(char** value, uint16_t* len = NULL) {
-    uint16_t length;
-    readInt(&length);
-    checkBufferSize(length);
-    if (len != NULL) {
-      *len = length;
-    }
-    char* str;
-    GF_NEW(str, char[length + 1]);
-    *value = str;
-    readBytesOnly(reinterpret_cast<int8_t*>(str), length);
-    str[length] = '\0';
-  }
-
-  /**
-   * Allocates a c string buffer, and reads an ASCII string
-   * from <code>DataInput</code> into it.
-   * @remarks Sets integer at length to hold the strlen of the string. Value
-   *   is modified to point to the new allocation. The chars are allocated as
-   *   an array, so the caller must use <code>freeUTFMemory</code> when done.
-   *   Use this instead of <code>readUTF</code> when reading a string of length
-   *   greater than 64K.
-   *
-   * @param value output C string to hold the read characters; it is allocated
-   *   by this method
-   * @param len output parameter to hold the number of characters read from
-   *   stream; not set if NULL
-   */
-  inline void readASCIIHuge(char** value, uint32_t* len = NULL) {
-    uint32_t length;
-    readInt(&length);
-    if (len != NULL) {
-      *len = length;
-    }
-    char* str;
-    GF_NEW(str, char[length + 1]);
-    *value = str;
-    readBytesOnly(reinterpret_cast<int8_t*>(str), length);
-    str[length] = '\0';
-  }
-
-  /**
-   * Allocates a c string buffer, and reads a java modified UTF-8
-   * encoded string having maximum encoded length of 64K from
-   * <code>DataInput</code> into it.
-   * @remarks Sets integer at length to hold the strlen of the string. Value
-   *   is modified to point to the new allocation. The chars are allocated as
-   *   an array, so the caller must use <code>freeUTFMemory</code> when done.
-   *   Like <code>DataOutput::writeUTF</code> the maximum length supported by
-   *   this method is 64K; use <code>readAUTFHuge</code> to read strings of
-   *   length larger than this.
-   *
-   * @param value output C string to hold the read characters; it is allocated
-   *   by this method
-   * @param len output parameter to hold the number of characters read from
-   *   stream; not set if NULL
-   */
-  inline void readUTF(char** value, uint16_t* len = NULL) {
-    uint16_t length;
-    readInt(&length);
-    checkBufferSize(length);
-    uint16_t decodedLen =
-        static_cast<uint16_t>(getDecodedLength(m_buf, length));
-    if (len != NULL) {
-      *len = decodedLen;
-    }
-    char* str;
-    GF_NEW(str, char[decodedLen + 1]);
-    *value = str;
-    for (uint16_t i = 0; i < decodedLen; i++) {
-      decodeChar(str++);
-    }
-    *str = '\0';  // null terminate for c-string.
-  }
-
-  /**
-   * Reads a java modified UTF-8 encoded string having maximum encoded length
-   * of 64K without reading the length which must be passed as a parameter.
-   * Allocates a c string buffer, and deserializes into it. Sets integer at
-   * length to hold the length of the string. Value is modified to point to the
-   * new allocation. The chars are allocated as an array, so the caller must
-   * use freeUTFMemory when done.
-   * If len == NULL, then the decoded string length is not set.
-   */
-  inline void readUTFNoLen(wchar_t** value, uint16_t decodedLen) {
-    wchar_t* str;
-    GF_NEW(str, wchar_t[decodedLen + 1]);
-    *value = str;
-    for (uint16_t i = 0; i < decodedLen; i++) {
-      decodeChar(str++);
-    }
-    *str = L'\0';  // null terminate for c-string.
-  }
-
-  /**
-   * Allocates a c string buffer, and reads a java modified UTF-8
-   * encoded string from <code>DataInput</code> into it.
-   * @remarks Sets integer at length to hold the strlen of the string. Value
-   *   is modified to point to the new allocation. The chars are allocated as
-   *   an array, so the caller must use <code>freeUTFMemory</code> when done.
-   *   Use this instead of <code>readUTF</code> when reading a string of length
-   *   greater than 64K.
-   *
-   * @param value output C string to hold the read characters; it is allocated
-   *   by this method
-   * @param len output parameter to hold the number of characters read from
-   *   stream; not set if NULL
-   */
-  inline void readUTFHuge(char** value, uint32_t* len = NULL) {
-    uint32_t length;
-    readInt(&length);
-    if (len != NULL) {
-      *len = length;
-    }
-    char* str;
-    GF_NEW(str, char[length + 1]);
-    *value = str;
-    for (uint32_t i = 0; i < length; i++) {
-      int8_t item;
-      read(&item);  // ignore this - should be higher order zero byte
-      read(&item);
-      *str = item;
-      str++;
-    }
-    *str = '\0';  // null terminate for c-string.
-  }
-
-  /**
-   * Allocates a wide-character string buffer, and reads a java
-   * modified UTF-8 encoded string having maximum encoded length of 64K from
-   * <code>DataInput</code> into it.
-   * @remarks Sets integer at length to hold the strlen of the string. Value
-   *   is modified to point to the new allocation. The chars are allocated as
-   *   an array, so the caller must use <code>freeUTFMemory</code> when done.
-   *   Like <code>DataOutput::writeUTF</code> the maximum length supported by
-   *   this method is 64K; use <code>readAUTFHuge</code> to read strings of
-   *   length larger than this.
-   *
-   * @param value output wide-character string to hold the read characters;
-   *   it is allocated by this method
-   * @param len output parameter to hold the number of characters read from
-   *   stream; not set if NULL
-   */
-  inline void readUTF(wchar_t** value, uint16_t* len = NULL) {
-    uint16_t length;
-    readInt(&length);
-    checkBufferSize(length);
-    uint16_t decodedLen =
-        static_cast<uint16_t>(getDecodedLength(m_buf, length));
-    if (len != NULL) {
-      *len = decodedLen;
-    }
-    wchar_t* str;
-    GF_NEW(str, wchar_t[decodedLen + 1]);
-    *value = str;
-    for (uint16_t i = 0; i < decodedLen; i++) {
-      decodeChar(str++);
-    }
-    *str = L'\0';  // null terminate for c-string.
-  }
-
-  /**
-   * Allocates a wide-character string buffer, and reads a java
-   * modified UTF-8 encoded string from <code>DataInput</code> into it.
-   * @remarks Sets integer at length to hold the strlen of the string. Value
-   *   is modified to point to the new allocation. The chars are allocated as
-   *   an array, so the caller must use <code>freeUTFMemory</code> when done.
-   *   Use this instead of <code>readUTF</code> when reading a string of length
-   *   greater than 64K.
-   *
-   * @param value output wide-character string to hold the read characters;
-   *   it is allocated by this method
-   * @param len output parameter to hold the number of characters read from
-   *   stream; not set if NULL
-   */
-  inline void readUTFHuge(wchar_t** value, uint32_t* len = NULL) {
-    uint32_t length;
-    readInt(&length);
-    if (len != NULL) {
-      *len = length;
-    }
-    wchar_t* str;
-    GF_NEW(str, wchar_t[length + 1]);
-    *value = str;
-    for (uint32_t i = 0; i < length; i++) {
-      uint8_t hibyte;
-      read(&hibyte);
-      uint8_t lobyte;
-      read(&lobyte);
-      *str = ((static_cast<uint16_t>(hibyte)) << 8) |
-             static_cast<uint16_t>(lobyte);
-      str++;
-    }
-    *str = L'\0';  // null terminate for c-string.
-  }
-
-  /**
-   * Read a <code>Serializable</code> object from the <code>DataInput</code>.
-   * Null objects are handled.
-   * This accepts an argument <code>throwOnError</code> that
-   * specifies whether to check the type dynamically and throw a
-   * <code>ClassCastException</code> when the cast fails.
-   *
-   * @param ptr The object to be read which is output by reference.
-   *            The type of this must match the type of object that
-   *            the application expects.
-   * @param throwOnError Throw a <code>ClassCastException</code> when
-   *                     the type of object does not match <code>ptr</code>.
-   *                     Default is true when <code>GF_DEBUG_ASSERTS</code>
-   *                     macro is set and false in normal case.
-   * @throws ClassCastException When <code>dynCast</code> fails
-   *                            for the given <code>ptr</code>.
-   * @see dynCast
-   * @see staticCast
-   */
-  template <class PTR>
-  inline void readObject(SharedPtr<PTR>& ptr,
-                         bool throwOnError = DINP_THROWONERROR_DEFAULT) {
-    SerializablePtr sPtr;
-    readObjectInternal(sPtr);
-    if (throwOnError) {
-      ptr = dynCast<SharedPtr<PTR> >(sPtr);
-    } else {
-      ptr = staticCast<SharedPtr<PTR> >(sPtr);
-    }
-  }
-
-  inline bool readNativeBool() {
-    int8_t typeId = 0;
-    read(&typeId);
-
-    bool val;
-    readBoolean(&val);
-    return val;
-  }
-
-  inline int32_t readNativeInt32() {
-    int8_t typeId = 0;
-    read(&typeId);
-
-    int32_t val;
-    readInt(&val);
-    return val;
-  }
-
-  inline bool readNativeString(CacheableStringPtr& csPtr) {
-    int8_t typeId = 0;
-    read(&typeId);
-    int64_t compId = typeId;
-    if (compId == GeodeTypeIds::NullObj) {
-      csPtr = NULLPTR;
-    } else if (compId == GeodeTypeIds::CacheableNullString) {
-      csPtr = CacheableStringPtr(dynamic_cast<CacheableString*>(
-          CacheableString::createDeserializable()));
-    } else if (compId ==
-               apache::geode::client::GeodeTypeIds::CacheableASCIIString) {
-      csPtr = CacheableStringPtr(dynamic_cast<CacheableString*>(
-          CacheableString::createDeserializable()));
-      csPtr.ptr()->fromData(*this);
-    } else if (compId ==
-               apache::geode::client::GeodeTypeIds::CacheableASCIIStringHuge) {
-      csPtr = CacheableStringPtr(dynamic_cast<CacheableString*>(
-          CacheableString::createDeserializableHuge()));
-      csPtr.ptr()->fromData(*this);
-    } else if (compId == apache::geode::client::GeodeTypeIds::CacheableString) {
-      csPtr = CacheableStringPtr(dynamic_cast<CacheableString*>(
-          CacheableString::createUTFDeserializable()));
-      csPtr.ptr()->fromData(*this);
-    } else if (compId ==
-               apache::geode::client::GeodeTypeIds::CacheableStringHuge) {
-      csPtr = CacheableStringPtr(dynamic_cast<CacheableString*>(
-          CacheableString::createUTFDeserializableHuge()));
-      csPtr.ptr()->fromData(*this);
-    } else {
-      LOGDEBUG("In readNativeString something is wrong while expecting string");
-      rewindCursor(1);
-      csPtr = NULLPTR;
-      return false;
-    }
-    return true;
-  }
-
-  inline void readDirectObject(SerializablePtr& ptr, int8_t typeId = -1) {
-    readObjectInternal(ptr, typeId);
-  }
-
-  /**
-   * Read a <code>Serializable</code> object from the <code>DataInput</code>.
-   * Null objects are handled.
-   */
-  inline void readObject(SerializablePtr& ptr) { readObjectInternal(ptr); }
-
-  inline void readObject(wchar_t* value) {
-    uint16_t temp = 0;
-    readInt(&temp);
-    *value = static_cast<wchar_t>(temp);
-  }
-
-  inline void readObject(bool* value) { readBoolean(value); }
-
-  inline void readObject(int8_t* value) { read(value); }
-
-  inline void readObject(int16_t* value) { readInt(value); }
-
-  inline void readObject(int32_t* value) { readInt(value); }
-
-  inline void readObject(int64_t* value) { readInt(value); }
-
-  inline void readObject(float* value) { readFloat(value); }
-
-  inline void readObject(double* value) { readDouble(value); }
-
-  inline void readCharArray(char** value, int32_t& length) {
-    int arrayLen = 0;
-    readArrayLen(&arrayLen);
-    length = arrayLen;
-    char* objArray = NULL;
-    if (arrayLen > 0) {
-      objArray = new char[arrayLen];
-      int i = 0;
-      for (i = 0; i < arrayLen; i++) {
-        char tmp = 0;
-        readPdxChar(&tmp);
-        objArray[i] = tmp;
-      }
-      *value = objArray;
-    }
-  }
-
-  inline void readWideCharArray(wchar_t** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readBooleanArray(bool** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readByteArray(int8_t** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readShortArray(int16_t** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readIntArray(int32_t** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readLongArray(int64_t** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readFloatArray(float** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readDoubleArray(double** value, int32_t& length) {
-    readObject(value, length);
-  }
-
-  inline void readString(char** value) {
-    int8_t typeId;
-    read(&typeId);
-
-    // Check for NULL String
-    if (typeId == GeodeTypeIds::CacheableNullString) {
-      *value = NULL;
-      return;
-    }
-    /*
-    if (typeId == GeodeTypeIds::CacheableString) {
-      readUTF(value);
-    } else {
-      readUTFHuge(value);
-    }
-    */
-    if (typeId == static_cast<int8_t>(GeodeTypeIds::CacheableASCIIString) ||
-        typeId == static_cast<int8_t>(GeodeTypeIds::CacheableString)) {
-      // readUTF( value);
-      readASCII(value);
-      // m_len = shortLen;
-    } else if (typeId == static_cast<int8_t>(
-                             GeodeTypeIds::CacheableASCIIStringHuge) ||
-               typeId ==
-                   static_cast<int8_t>(GeodeTypeIds::CacheableStringHuge)) {
-      // readUTFHuge( value);
-      readASCIIHuge(value);
-    } else {
-      throw IllegalArgumentException(
-          "DI readString error:: String type not supported ");
-    }
-  }
-
-  inline void readWideString(wchar_t** value) {
-    int8_t typeId;
-    read(&typeId);
-
-    // Check for NULL String
-    if (typeId == GeodeTypeIds::CacheableNullString) {
-      *value = NULL;
-      return;
-    }
-
-    if (typeId == static_cast<int8_t>(GeodeTypeIds::CacheableASCIIString) ||
-        typeId == static_cast<int8_t>(GeodeTypeIds::CacheableString)) {
-      readUTF(value);
-    } else if (typeId == static_cast<int8_t>(
-                             GeodeTypeIds::CacheableASCIIStringHuge) ||
-               typeId ==
-                   static_cast<int8_t>(GeodeTypeIds::CacheableStringHuge)) {
-      readUTFHuge(value);
-    } else {
-      throw IllegalArgumentException(
-          "DI readWideString error:: WideString type provided is not "
-          "supported ");
-    }
-  }
-
-  inline void readStringArray(char*** strArray, int32_t& length) {
-    int32_t arrLen;
-    readArrayLen(&arrLen);
-    length = arrLen;
-    if (arrLen == -1) {
-      *strArray = NULL;
-      return;
-    } else {
-      char** tmpArray;
-      GF_NEW(tmpArray, char * [arrLen]);
-      for (int i = 0; i < arrLen; i++) {
-        readString(&tmpArray[i]);
-      }
-      *strArray = tmpArray;
-    }
-  }
-
-  inline void readWideStringArray(wchar_t*** strArray, int32_t& length) {
-    int32_t arrLen;
-    readArrayLen(&arrLen);
-    length = arrLen;
-    if (arrLen == -1) {
-      *strArray = NULL;
-      return;
-    } else {
-      wchar_t** tmpArray;
-      GF_NEW(tmpArray, wchar_t * [arrLen]);
-      for (int i = 0; i < arrLen; i++) {
-        readWideString(&tmpArray[i]);
-      }
-      *strArray = tmpArray;
-    }
-  }
-
-  inline void readArrayOfByteArrays(int8_t*** arrayofBytearr,
-                                    int32_t& arrayLength,
-                                    int32_t** elementLength) {
-    int32_t arrLen;
-    readArrayLen(&arrLen);
-    arrayLength = arrLen;
-
-    if (arrLen == -1) {
-      *arrayofBytearr = NULL;
-      return;
-    } else {
-      int8_t** tmpArray;
-      int32_t* tmpLengtharr;
-      GF_NEW(tmpArray, int8_t * [arrLen]);
-      GF_NEW(tmpLengtharr, int32_t[arrLen]);
-      for (int i = 0; i < arrLen; i++) {
-        readBytes(&tmpArray[i], &tmpLengtharr[i]);
-      }
-      *arrayofBytearr = tmpArray;
-      *elementLength = tmpLengtharr;
-    }
-  }
-
-  /**
-   * Get the length required to represent a given UTF-8 encoded string
-   * (created using {@link DataOutput::writeUTF} or
-   * <code>java.io.DataOutput.writeUTF</code>) in wide-character format.
-   *
-   * @param value The UTF-8 encoded stream.
-   * @param length The length of the stream to be read.
-   * @return The length of the decoded string.
-   * @see DataOutput::getEncodedLength
-   */
-  static int32_t getDecodedLength(const uint8_t* value, int32_t length) {
-    const uint8_t* end = value + length;
-    int32_t decodedLen = 0;
-    while (value < end) {
-      // get next byte unsigned
-      int32_t b = *value++ & 0xff;
-      int32_t k = b >> 5;
-      // classify based on the high order 3 bits
-      switch (k) {
-        case 6: {
-          value++;
-          break;
-        }
-        case 7: {
-          value += 2;
-          break;
-        }
-        default:
-          break;
-      }
-      decodedLen += 1;
-    }
-    if (value > end) decodedLen--;
-    return decodedLen;
-  }
-
-  /** constructor given a pre-allocated byte array with size */
-  DataInput(const uint8_t* m_buffer, int32_t len)
-      : m_buf(m_buffer),
-        m_bufHead(m_buffer),
-        m_bufLength(len),
-        m_poolName(NULL) {}
-
-  /** destructor */
-  ~DataInput() {}
-
-  /**
-   * Get the pointer to current buffer position. This should be treated
-   * as readonly and modification of contents using this internal pointer
-   * has undefined behavior.
-   */
-  inline const uint8_t* currentBufferPosition() const { return m_buf; }
-
-  /** get the number of bytes read in the buffer */
-  inline int32_t getBytesRead() const {
-    return static_cast<int32_t>(m_buf - m_bufHead);
-  }
-
-  /** get the number of bytes remaining to be read in the buffer */
-  inline int32_t getBytesRemaining() const {
-    return (m_bufLength - getBytesRead());
-  }
-
-  /** advance the cursor by given offset */
-  inline void advanceCursor(int32_t offset) { m_buf += offset; }
-
-  /** rewind the cursor by given offset */
-  inline void rewindCursor(int32_t offset) { m_buf -= offset; }
-
-  /** reset the cursor to the start of buffer */
-  inline void reset() { m_buf = m_bufHead; }
-
-  inline void setBuffer() {
-    m_buf = currentBufferPosition();
-    m_bufLength = getBytesRemaining();
-  }
-
-  inline void resetPdx(int32_t offset) { m_buf = m_bufHead + offset; }
-
-  inline int32_t getPdxBytes() const { return m_bufLength; }
-
-  static uint8_t* getBufferCopy(const uint8_t* from, uint32_t length) {
-    uint8_t* result;
-    GF_NEW(result, uint8_t[length]);
-    memcpy(result, from, length);
-
-    return result;
-  }
-
-  inline void reset(int32_t offset) { m_buf = m_bufHead + offset; }
-
-  uint8_t* getBufferCopyFrom(const uint8_t* from, uint32_t length) {
-    uint8_t* result;
-    GF_NEW(result, uint8_t[length]);
-    memcpy(result, from, length);
-
-    return result;
-  }
-
-  /*
-   * This is for internal use
-   */
-  const char* getPoolName() { return m_poolName; }
-
-  /*
-   * This is for internal use
-   */
-  void setPoolName(const char* poolName) { m_poolName = poolName; }
-
- private:
-  const uint8_t* m_buf;
-  const uint8_t* m_bufHead;
-  int32_t m_bufLength;
-  const char* m_poolName;
-
-  void readObjectInternal(SerializablePtr& ptr, int8_t typeId = -1);
-
-  template <typename mType>
-  void readObject(mType** value, int32_t& length) {
-    int arrayLen;
-    readArrayLen(&arrayLen);
-    length = arrayLen;
-    mType* objArray;
-    if (arrayLen > 0) {
-      objArray = new mType[arrayLen];
-      int i = 0;
-      for (i = 0; i < arrayLen; i++) {
-        mType tmp = 0;
-        readObject(&tmp);
-        objArray[i] = tmp;  //*value[i] = tmp;
-      }
-      *value = objArray;
-    }
-  }
-
-  inline void readPdxChar(char* value) {
-    int16_t val = 0;
-    readInt(&val);
-    *value = static_cast<char>(val);
-  }
-
-  inline void _checkBufferSize(int32_t size, int32_t line) {
-    if ((m_bufLength - (m_buf - m_bufHead)) < size) {
-      char exMsg[128];
-      gf_sprintf(exMsg,
-                 "DataInput: attempt to read beyond buffer at line %d: "
-                 "available buffer size %d, attempted read of size %d ",
-                 line, m_bufLength - (m_buf - m_bufHead), size);
-      throw OutOfRangeException(exMsg);
-    }
-  }
-
-  inline void decodeChar(char* str) {
-    uint8_t bt = *(m_buf++);
-    if (bt & 0x80) {
-      if (bt & 0x20) {
-        // three bytes.
-        *str =
-            static_cast<char>(((bt & 0x0f) << 12) | (((*m_buf++) & 0x3f) << 6));
-        *str |= static_cast<char>((*m_buf++) & 0x3f);
-      } else {
-        // two bytes.
-        *str = static_cast<char>(((bt & 0x1f) << 6) | ((*m_buf++) & 0x3f));
-      }
-    } else {
-      // single byte...
-      *str = bt;
-    }
-  }
-
-  inline void decodeChar(wchar_t* str) {
-    // get next byte unsigned
-    int32_t b = *m_buf++ & 0xff;
-    int32_t k = b >> 5;
-    // classify based on the high order 3 bits
-    switch (k) {
-      case 6: {
-        // two byte encoding
-        // 110yyyyy 10xxxxxx
-        // use low order 6 bits
-        int32_t y = b & 0x1f;
-        // use low order 6 bits of the next byte
-        // It should have high order bits 10, which we don't check.
-        int32_t x = *m_buf++ & 0x3f;
-        // 00000yyy yyxxxxxx
-        *str = (y << 6 | x);
-        break;
-      }
-      case 7: {
-        // three byte encoding
-        // 1110zzzz 10yyyyyy 10xxxxxx
-        // assert ( b & 0x10 )
-        //     == 0 : "UTF8Decoder does not handle 32-bit characters";
-        // use low order 4 bits
-        int32_t z = b & 0x0f;
-        // use low order 6 bits of the next byte
-        // It should have high order bits 10, which we don't check.
-        int32_t y = *m_buf++ & 0x3f;
-        // use low order 6 bits of the next byte
-        // It should have high order bits 10, which we don't check.
-        int32_t x = *m_buf++ & 0x3f;
-        // zzzzyyyy yyxxxxxx
-        int32_t asint = (z << 12 | y << 6 | x);
-        *str = asint;
-        break;
-      }
-      default:
-        // one byte encoding
-        // 0xxxxxxx
-        // use just low order 7 bits
-        // 00000000 0xxxxxxx
-        *str = (b & 0x7f);
-        break;
-    }
-  }
-
-  // disable other constructors and assignment
-  DataInput();
-  DataInput(const DataInput&);
-  DataInput& operator=(const DataInput&);
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_GFCPP_DATAINPUT_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/DataOutput.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/DataOutput.hpp b/src/cppcache/include/gfcpp/DataOutput.hpp
deleted file mode 100644
index 4f03fc4..0000000
--- a/src/cppcache/include/gfcpp/DataOutput.hpp
+++ /dev/null
@@ -1,823 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_DATAOUTPUT_H_
-#define GEODE_GFCPP_DATAOUTPUT_H_
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "gfcpp_globals.hpp"
-#include "ExceptionTypes.hpp"
-#include "Log.hpp"
-#include "Serializable.hpp"
-#include "CacheableString.hpp"
-
-extern "C" {
-#include <string.h>
-#include <stdlib.h>
-}
-
-/**
- * @file
- */
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * C style memory allocation that throws OutOfMemoryException
- * if it fails
- */
-#define GF_ALLOC(v, t, s)                                                  \
-  {                                                                        \
-    v = (t*)malloc((s) * sizeof(t));                                       \
-    if ((v) == NULL) {                                                     \
-      throw OutOfMemoryException(                                          \
-          "Out of Memory while allocating buffer for " #t " of size " #s); \
-    }                                                                      \
-  }
-
-/**
- * C style memory re-allocation that throws OutOfMemoryException
- * if it fails
- */
-#define GF_RESIZE(v, t, s)                                \
-  {                                                       \
-    v = (t*)realloc(v, (s) * sizeof(t));                  \
-    if ((v) == NULL) {                                    \
-      throw OutOfMemoryException(                         \
-          "Out of Memory while resizing buffer for " #t); \
-    }                                                     \
-  }
-
-#define GF_FREE(v) free(v)
-
-/**
- * Provide operations for writing primitive data values, byte arrays,
- * strings, <code>Serializable</code> objects to a byte stream.
- * This class is intentionally not thread safe.
- */
-class CPPCACHE_EXPORT DataOutput {
- public:
-  /**
-   * Construct a new DataOutput.
-   */
-  DataOutput();
-
-  /**
-   * Write an unsigned byte to the <code>DataOutput</code>.
-   *
-   * @param value the unsigned byte to be written
-   */
-  inline void write(uint8_t value) {
-    ensureCapacity(1);
-    writeNoCheck(value);
-  }
-
-  /**
-   * Write a signed byte to the <code>DataOutput</code>.
-   *
-   * @param value the signed byte to be written
-   */
-  inline void write(int8_t value) { write(static_cast<uint8_t>(value)); }
-
-  /**
-   * Write a boolean value to the <code>DataOutput</code>.
-   *
-   * @param value the boolean value to be written
-   */
-  inline void writeBoolean(bool value) { write(static_cast<uint8_t>(value)); }
-
-  /**
-   * Write an array of unsigned bytes to the <code>DataOutput</code>.
-   *
-   * @param value the array of unsigned bytes to be written
-   * @param len the number of bytes from the start of array to be written
-   */
-  inline void writeBytes(const uint8_t* bytes, int32_t len) {
-    if (len >= 0) {
-      ensureCapacity(len + 5);
-      writeArrayLen(bytes == NULL ? 0 : len);  // length of bytes...
-      if (len > 0 && bytes != NULL) {
-        memcpy(m_buf, bytes, len);
-        m_buf += len;
-      }
-    } else {
-      write(static_cast<int8_t>(-1));
-    }
-  }
-
-  /**
-   * Write an array of signed bytes to the <code>DataOutput</code>.
-   *
-   * @param value the array of signed bytes to be written
-   * @param len the number of bytes from the start of array to be written
-   */
-  inline void writeBytes(const int8_t* bytes, int32_t len) {
-    writeBytes(reinterpret_cast<const uint8_t*>(bytes), len);
-  }
-
-  /**
-   * Write an array of unsigned bytes without its length to the
-   * <code>DataOutput</code>.
-   * @remarks The difference between this and <code>writeBytes</code> is that
-   *   this does write the length of bytes so the corresponding
-   *   <code>DataInput::readBytesOnly</code> (unlike
-   *   <code>DataInput::readBytes</code>) needs the length argument explicitly.
-   *
-   * @param value the array of unsigned bytes to be written
-   * @param len the number of bytes from the start of array to be written
-   */
-  inline void writeBytesOnly(const uint8_t* bytes, uint32_t len) {
-    ensureCapacity(len);
-    memcpy(m_buf, bytes, len);
-    m_buf += len;
-  }
-
-  /**
-   * Write an array of signed bytes without its length to the
-   * <code>DataOutput</code>.
-   * @remarks The difference between this and <code>writeBytes</code> is that
-   *   this does write the length of bytes so the corresponding
-   *   <code>DataInput::readBytesOnly</code> (unlike
-   *   <code>DataInput::readBytes</code>) needs the length argument explicitly.
-   *
-   * @param value the array of signed bytes to be written
-   * @param len the number of bytes from the start of array to be written
-   */
-  inline void writeBytesOnly(const int8_t* bytes, uint32_t len) {
-    writeBytesOnly(reinterpret_cast<const uint8_t*>(bytes), len);
-  }
-
-  /**
-   * Write a 16-bit unsigned integer value to the <code>DataOutput</code>.
-   *
-   * @param value the 16-bit unsigned integer value to be written
-   */
-  inline void writeInt(uint16_t value) {
-    ensureCapacity(2);
-    *(m_buf++) = static_cast<uint8_t>(value >> 8);
-    *(m_buf++) = static_cast<uint8_t>(value);
-  }
-
-  /**
-   * Write a 16-bit Char (wchar_t) value to the <code>DataOutput</code>.
-   *
-   * @param value the 16-bit wchar_t value to be written
-   */
-  inline void writeChar(uint16_t value) {
-    ensureCapacity(2);
-    *(m_buf++) = static_cast<uint8_t>(value >> 8);
-    *(m_buf++) = static_cast<uint8_t>(value);
-  }
-
-  /**
-   * Write a 32-bit unsigned integer value to the <code>DataOutput</code>.
-   *
-   * @param value the 32-bit unsigned integer value to be written
-   */
-  inline void writeInt(uint32_t value) {
-    ensureCapacity(4);
-    *(m_buf++) = static_cast<uint8_t>(value >> 24);
-    *(m_buf++) = static_cast<uint8_t>(value >> 16);
-    *(m_buf++) = static_cast<uint8_t>(value >> 8);
-    *(m_buf++) = static_cast<uint8_t>(value);
-  }
-
-  /**
-   * Write a 64-bit unsigned integer value to the <code>DataOutput</code>.
-   *
-   * @param value the 64-bit unsigned integer value to be written
-   */
-  inline void writeInt(uint64_t value) {
-    ensureCapacity(8);
-    // the defines are not reliable and can be changed by compiler options.
-    // Hence using sizeof() test instead.
-    //#if defined(_LP64) || ( defined(__WORDSIZE) && __WORDSIZE == 64 ) ||
-    //( defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64 )
-    if (sizeof(long) == 8) {
-      *(m_buf++) = static_cast<uint8_t>(value >> 56);
-      *(m_buf++) = static_cast<uint8_t>(value >> 48);
-      *(m_buf++) = static_cast<uint8_t>(value >> 40);
-      *(m_buf++) = static_cast<uint8_t>(value >> 32);
-      *(m_buf++) = static_cast<uint8_t>(value >> 24);
-      *(m_buf++) = static_cast<uint8_t>(value >> 16);
-      *(m_buf++) = static_cast<uint8_t>(value >> 8);
-      *(m_buf++) = static_cast<uint8_t>(value);
-    } else {
-      uint32_t hword = static_cast<uint32_t>(value >> 32);
-      *(m_buf++) = static_cast<uint8_t>(hword >> 24);
-      *(m_buf++) = static_cast<uint8_t>(hword >> 16);
-      *(m_buf++) = static_cast<uint8_t>(hword >> 8);
-      *(m_buf++) = static_cast<uint8_t>(hword);
-
-      hword = static_cast<uint32_t>(value);
-      *(m_buf++) = static_cast<uint8_t>(hword >> 24);
-      *(m_buf++) = static_cast<uint8_t>(hword >> 16);
-      *(m_buf++) = static_cast<uint8_t>(hword >> 8);
-      *(m_buf++) = static_cast<uint8_t>(hword);
-    }
-  }
-
-  /**
-   * Write a 16-bit signed integer value to the <code>DataOutput</code>.
-   *
-   * @param value the 16-bit signed integer value to be written
-   */
-  inline void writeInt(int16_t value) {
-    writeInt(static_cast<uint16_t>(value));
-  }
-
-  /**
-   * Write a 32-bit signed integer value to the <code>DataOutput</code>.
-   *
-   * @param value the 32-bit signed integer value to be written
-   */
-  inline void writeInt(int32_t value) {
-    writeInt(static_cast<uint32_t>(value));
-  }
-
-  /**
-   * Write a 64-bit signed integer value to the <code>DataOutput</code>.
-   *
-   * @param value the 64-bit signed integer value to be written
-   */
-  inline void writeInt(int64_t value) {
-    writeInt(static_cast<uint64_t>(value));
-  }
-
-  /**
-   * Write a 32-bit signed integer array length value to the
-   * <code>DataOutput</code> in a manner compatible with java server's
-   * <code>DataSerializer.writeArrayLength</code>.
-   *
-   * @param value the 32-bit signed integer array length to be written
-   */
-  inline void writeArrayLen(int32_t len) {
-    if (len == -1) {
-      write(static_cast<int8_t>(-1));
-    } else if (len <= 252) {  // 252 is java's ((byte)-4 && 0xFF)
-      write(static_cast<uint8_t>(len));
-    } else if (len <= 0xFFFF) {
-      write(static_cast<int8_t>(-2));
-      writeInt(static_cast<uint16_t>(len));
-    } else {
-      write(static_cast<int8_t>(-3));
-      writeInt(len);
-    }
-  }
-
-  /**
-   * Write a float value to the <code>DataOutput</code>.
-   *
-   * @param value the float value to be written
-   */
-  inline void writeFloat(float value) {
-    union float_uint32_t {
-      float f;
-      uint32_t u;
-    } v;
-    v.f = value;
-    writeInt(v.u);
-  }
-
-  /**
-   * Write a double precision real number to the <code>DataOutput</code>.
-   *
-   * @param value the double precision real number to be written
-   */
-  inline void writeDouble(double value) {
-    union double_uint64_t {
-      double d;
-      uint64_t ll;
-    } v;
-    v.d = value;
-    writeInt(v.ll);
-  }
-
-  /**
-   * Writes the given ASCII string supporting maximum length of 64K
-   * (i.e. unsigned 16-bit integer).
-   * @remarks The string will be truncated if greater than the maximum
-   *   permissible length of 64K. Use <code>writeBytes</code> or
-   *   <code>writeASCIIHuge</code> to write ASCII strings of length larger
-   *   than this.
-   *
-   * @param value the C string to be written
-   * @param length the number of characters from start of string to be
-   *   written; the default value of 0 implies the complete string
-   */
-  inline void writeASCII(const char* value, uint32_t length = 0) {
-    if (value != NULL) {
-      if (length == 0) {
-        length = static_cast<uint32_t>(strlen(value));
-      }
-      uint16_t len = static_cast<uint16_t>(length > 0xFFFF ? 0xFFFF : length);
-      writeInt(len);
-      writeBytesOnly((int8_t*)value, len);  // K64
-    } else {
-      writeInt(static_cast<uint16_t>(0));
-    }
-  }
-
-  inline void writeNativeString(const char* value) {
-    // create cacheable string
-    // write typeid id.
-    // call todata
-    CacheableStringPtr csPtr = CacheableString::create(value);
-    write(csPtr->typeId());
-    csPtr->toData(*this);
-  }
-
-  /**
-   * Writes the given ASCII string supporting upto maximum 32-bit
-   * integer value.
-   * @remarks Use this to write large ASCII strings. The other
-   *   <code>writeASCII</code> method will truncate strings greater than
-   *   64K in size.
-   *
-   * @param value the wide-character string to be written
-   * @param length the number of characters from start of string to be
-   *   written; the default value of 0 implies the complete string
-   */
-  inline void writeASCIIHuge(const char* value, uint32_t length = 0) {
-    if (value != NULL) {
-      if (length == 0) {
-        length = static_cast<uint32_t>(strlen(value));
-      }
-      writeInt(length);
-      writeBytesOnly((int8_t*)value, length);
-    } else {
-      writeInt(static_cast<uint32_t>(0));
-    }
-  }
-
-  /**
-     * Writes the given given string using java modified UTF-8 encoding
-     * supporting maximum encoded length of 64K (i.e. unsigned 16-bit integer).
-     * @remarks The string will be truncated if greater than the maximum
-     *   permissible length of 64K. Use <code>writeUTFHuge</code> to write
-     *   strings of length larger than this.
-     *
-     * @param value the C string to be written
-     *
-     */
-  inline void writeFullUTF(const char* value, uint32_t length = 0) {
-    if (value != NULL) {
-      int32_t len = getEncodedLength(value, length);
-      uint16_t encodedLen = static_cast<uint16_t>(len > 0xFFFF ? 0xFFFF : len);
-      writeInt(static_cast<int32_t>(encodedLen));
-      ensureCapacity(encodedLen);
-      write(static_cast<int8_t>(0));  // isObject = 0 BYTE_CODE
-      uint8_t* end = m_buf + encodedLen;
-      while (m_buf < end) {
-        encodeChar(*value++);
-      }
-      if (m_buf > end) m_buf = end;
-    } else {
-      writeInt(static_cast<uint16_t>(0));
-    }
-  }
-
-  /**
-   * Writes the given given string using java modified UTF-8 encoding
-   * supporting maximum encoded length of 64K (i.e. unsigned 16-bit integer).
-   * @remarks The string will be truncated if greater than the maximum
-   *   permissible length of 64K. Use <code>writeUTFHuge</code> to write
-   *   strings of length larger than this.
-   *
-   * @param value the C string to be written
-   * @param length the number of characters from start of string to be
-   *   written; the default value of 0 implies the complete string
-   */
-  inline void writeUTF(const char* value, uint32_t length = 0) {
-    if (value != NULL) {
-      int32_t len = getEncodedLength(value, length);
-      uint16_t encodedLen = static_cast<uint16_t>(len > 0xFFFF ? 0xFFFF : len);
-      writeInt(encodedLen);
-      ensureCapacity(encodedLen);
-      uint8_t* end = m_buf + encodedLen;
-      while (m_buf < end) {
-        encodeChar(*value++);
-      }
-      if (m_buf > end) m_buf = end;
-    } else {
-      writeInt(static_cast<uint16_t>(0));
-    }
-  }
-
-  /**
-   * Writes the given string using java modified UTF-8 encoding.
-   * @remarks Use this to write large strings. The other
-   *   <code>writeUTF</code> method will truncate strings greater than
-   *   64K in size.
-   *
-   * @param value the C string to be written
-   * @param length the number of characters from start of string to be
-   *   written; the default value of 0 implies the complete string
-   *   assuming a null terminated string; do not use this unless sure
-   *   that the UTF string does not contain any null characters
-   */
-  inline void writeUTFHuge(const char* value, uint32_t length = 0) {
-    if (value != NULL) {
-      if (length == 0) {
-        length = static_cast<uint32_t>(strlen(value));
-      }
-      writeInt(length);
-      ensureCapacity(length * 2);
-      for (uint32_t pos = 0; pos < length; pos++) {
-        writeNoCheck(static_cast<int8_t>(0));
-        writeNoCheck(static_cast<int8_t>(value[pos]));
-      }
-    } else {
-      writeInt(static_cast<uint32_t>(0));
-    }
-  }
-
-  /**
-   * Writes the given given string using java modified UTF-8 encoding
-   * supporting maximum encoded length of 64K (i.e. unsigned 16-bit integer).
-   * @remarks The string will be truncated if greater than the maximum
-   *   permissible length of 64K. Use <code>writeUTFHuge</code> to write
-   *   strings of length larger than this.
-   *
-   * @param value the wide-character string to be written
-   * @param length the number of characters from start of string to be
-   *   written; the default value of 0 implies the complete string
-   */
-  inline void writeUTF(const wchar_t* value, uint32_t length = 0) {
-    if (value != NULL) {
-      int32_t len = getEncodedLength(value, length);
-      uint16_t encodedLen = static_cast<uint16_t>(len > 0xFFFF ? 0xFFFF : len);
-      writeInt(encodedLen);
-      ensureCapacity(encodedLen);
-      uint8_t* end = m_buf + encodedLen;
-      while (m_buf < end) {
-        encodeChar(*value++);
-      }
-      if (m_buf > end) m_buf = end;
-    } else {
-      writeInt(static_cast<uint16_t>(0));
-    }
-  }
-
-  /**
-   * Writes the given string using java modified UTF-8 encoding.
-   * @remarks Use this to write large strings. The other
-   *   <code>writeUTF</code> method will truncate strings greater than
-   *   64K in size.
-   *
-   * @param value the wide-character string to be written
-   * @param length the number of characters from start of string to be
-   *   written; the default value of 0 implies the complete string
-   */
-  inline void writeUTFHuge(const wchar_t* value, uint32_t length = 0) {
-    if (value != NULL) {
-      if (length == 0) {
-        length = static_cast<uint32_t>(wcslen(value));
-      }
-      writeInt(length);
-      ensureCapacity(length * 2);
-      for (uint32_t pos = 0; pos < length; pos++) {
-        uint16_t item = static_cast<uint16_t>(value[pos]);
-        writeNoCheck(static_cast<uint8_t>((item & 0xFF00) >> 8));
-        writeNoCheck(static_cast<uint8_t>(item & 0xFF));
-      }
-    } else {
-      writeInt(static_cast<uint32_t>(0));
-    }
-  }
-
-  /**
-   * Get the length required to represent a given wide-character string in
-   * java modified UTF-8 format.
-   *
-   * @param value The C string.
-   * @param length The length of the string; or zero to use the full string.
-   * @return The length required for representation in java modified
-   *         UTF-8 format.
-   * @see DataInput::getDecodedLength
-   */
-  inline static int32_t getEncodedLength(const char* value, int32_t length = 0,
-                                         uint32_t* valLength = NULL) {
-    if (value == NULL) return 0;
-    char currentChar;
-    int32_t encodedLen = 0;
-    const char* start = value;
-    if (length == 0) {
-      while ((currentChar = *value) != '\0') {
-        getEncodedLength(currentChar, encodedLen);
-        value++;
-      }
-    } else {
-      const char* end = value + length;
-      while (value < end) {
-        currentChar = *value;
-        getEncodedLength(currentChar, encodedLen);
-        value++;
-      }
-    }
-    if (valLength != NULL) {
-      *valLength = static_cast<uint32_t>(value - start);
-    }
-    return encodedLen;
-  }
-
-  /**
-   * Get the length required to represent a given wide-character string in
-   * java modified UTF-8 format.
-   *
-   * @param value The wide-character string.
-   * @param length The length of the string.
-   * @return The length required for representation in java modified
-   *         UTF-8 format.
-   * @see DataInput::getDecodedLength
-   */
-  inline static int32_t getEncodedLength(const wchar_t* value,
-                                         int32_t length = 0,
-                                         uint32_t* valLength = NULL) {
-    if (value == NULL) return 0;
-    wchar_t currentChar;
-    int32_t encodedLen = 0;
-    const wchar_t* start = value;
-    if (length == 0) {
-      while ((currentChar = *value) != 0) {
-        getEncodedLength(currentChar, encodedLen);
-        value++;
-      }
-    } else {
-      const wchar_t* end = value + length;
-      while (value < end) {
-        currentChar = *value;
-        getEncodedLength(currentChar, encodedLen);
-        value++;
-      }
-    }
-    if (valLength != NULL) {
-      *valLength = static_cast<uint32_t>(value - start);
-    }
-    return encodedLen;
-  }
-
-  /**
-   * Write a <code>Serializable</code> object to the <code>DataOutput</code>.
-   *
-   * @param objptr smart pointer to the <code>Serializable</code> object
-   *   to be written
-   */
-  template <class PTR>
-  void writeObject(const SharedPtr<PTR>& objptr, bool isDelta = false) {
-    writeObjectInternal(objptr.ptr(), isDelta);
-  }
-
-  /**
-   * Write a <code>Serializable</code> object to the <code>DataOutput</code>.
-   *
-   * @param objptr pointer to the <code>Serializable</code> object
-   *   to be written
-   */
-  void writeObject(const Serializable* objptr) { writeObjectInternal(objptr); }
-
-  /**
-   * Get an internal pointer to the current location in the
-   * <code>DataOutput</code> byte array.
-   */
-  const uint8_t* getCursor() { return m_buf; }
-
-  /**
-   * Advance the buffer cursor by the given offset.
-   *
-   * @param offset the offset by which to advance the cursor
-   */
-  void advanceCursor(uint32_t offset) {
-    ensureCapacity(offset);
-    m_buf += offset;
-  }
-
-  /**
-   * Rewind the buffer cursor by the given offset.
-   *
-   * @param offset the offset by which to rewind the cursor
-   */
-  void rewindCursor(uint32_t offset) { m_buf -= offset; }
-
-  void updateValueAtPos(uint32_t offset, uint8_t value) {
-    m_bytes[offset] = value;
-  }
-
-  uint8_t getValueAtPos(uint32_t offset) { return m_bytes[offset]; }
-  /** Destruct a DataOutput, including releasing the created buffer. */
-  ~DataOutput() {
-    reset();
-    DataOutput::checkinBuffer(m_bytes, m_size);
-  }
-
-  /**
-   * Get a pointer to the internal buffer of <code>DataOutput</code>.
-   */
-  inline const uint8_t* getBuffer() const {
-    // GF_R_ASSERT(!((uint32_t)(m_bytes) % 4));
-    return m_bytes;
-  }
-
-  /**
-   * Get a pointer to the internal buffer of <code>DataOutput</code>.
-   */
-  inline uint32_t getRemainingBufferLength() const {
-    // GF_R_ASSERT(!((uint32_t)(m_bytes) % 4));
-    return m_size - getBufferLength();
-  }
-
-  /**
-   * Get a pointer to the internal buffer of <code>DataOutput</code>.
-   *
-   * @param rsize the size of buffer is filled in this output parameter;
-   *   should not be NULL
-   */
-  inline const uint8_t* getBuffer(uint32_t* rsize) const {
-    *rsize = static_cast<uint32_t>(m_buf - m_bytes);
-    // GF_R_ASSERT(!((uint32_t)(m_bytes) % 4));
-    return m_bytes;
-  }
-
-  inline uint8_t* getBufferCopy() {
-    uint32_t size = static_cast<uint32_t>(m_buf - m_bytes);
-    uint8_t* result;
-    GF_ALLOC(result, uint8_t, size);
-    memcpy(result, m_bytes, size);
-    return result;
-  }
-
-  /**
-   * Get the length of current data in the internal buffer of
-   * <code>DataOutput</code>.
-   */
-  inline uint32_t getBufferLength() const {
-    return static_cast<uint32_t>(m_buf - m_bytes);
-  }
-
-  /**
-   * Reset the internal cursor to the start of the buffer.
-   */
-  inline void reset() {
-    if (m_haveBigBuffer) {
-      // free existing buffer
-      GF_FREE(m_bytes);
-      // create smaller buffer
-      GF_ALLOC(m_bytes, uint8_t, m_lowWaterMark);
-      m_size = m_lowWaterMark;
-      // reset the flag
-      m_haveBigBuffer = false;
-      // release the lock
-      releaseLock();
-    }
-    m_buf = m_bytes;
-  }
-
-  // make sure there is room left for the requested size item.
-  inline void ensureCapacity(uint32_t size) {
-    uint32_t offset = static_cast<uint32_t>(m_buf - m_bytes);
-    if ((m_size - offset) < size) {
-      uint32_t newSize = m_size * 2 + (8192 * (size / 8192));
-      if (newSize >= m_highWaterMark && !m_haveBigBuffer) {
-        // acquire the lock
-        acquireLock();
-        // set flag
-        m_haveBigBuffer = true;
-      }
-      m_size = newSize;
-      GF_RESIZE(m_bytes, uint8_t, m_size);
-      m_buf = m_bytes + offset;
-    }
-  }
-
-  /*
-  * This is for internal use
-  */
-  const char* getPoolName() { return m_poolName; }
-
-  /*
-   * This is for internal use
-   */
-  void setPoolName(const char* poolName) { m_poolName = poolName; }
-
-  uint8_t* getBufferCopyFrom(const uint8_t* from, uint32_t length) {
-    uint8_t* result;
-    GF_NEW(result, uint8_t[length]);
-    memcpy(result, from, length);
-
-    return result;
-  }
-
-  static void safeDelete(uint8_t* src) { GF_SAFE_DELETE(src); }
-
-  static DataOutput* getDataOutput() { return new DataOutput(); }
-  static void releaseDataOutput(DataOutput* dataOutput) {
-    GF_SAFE_DELETE(dataOutput);
-  }
-
- private:
-  void writeObjectInternal(const Serializable* ptr, bool isDelta = false);
-
-  static void acquireLock();
-  static void releaseLock();
-
-  const char* m_poolName;
-  // memory m_buffer to encode to.
-  uint8_t* m_bytes;
-  // cursor.
-  uint8_t* m_buf;
-  // size of m_bytes.
-  uint32_t m_size;
-  // high and low water marks for buffer size
-  static uint32_t m_lowWaterMark;
-  static uint32_t m_highWaterMark;
-  // flag to indicate we have a big buffer
-  volatile bool m_haveBigBuffer;
-
-  inline static void getEncodedLength(const char val, int32_t& encodedLen) {
-    if ((val == 0) || (val & 0x80)) {
-      // two byte.
-      encodedLen += 2;
-    } else {
-      // one byte.
-      encodedLen++;
-    }
-  }
-
-  inline static void getEncodedLength(const wchar_t val, int32_t& encodedLen) {
-    if (val == 0) {
-      encodedLen += 2;
-    } else if (val < 0x80)  // ASCII character
-    {
-      encodedLen++;
-    } else if (val < 0x800) {
-      encodedLen += 2;
-    } else {
-      encodedLen += 3;
-    }
-  }
-
-  inline void encodeChar(const char value) {
-    uint8_t tmp = static_cast<uint8_t>(value);
-    if ((tmp == 0) || (tmp & 0x80)) {
-      // two byte.
-      *(m_buf++) = static_cast<uint8_t>(0xc0 | ((tmp & 0xc0) >> 6));
-      *(m_buf++) = static_cast<uint8_t>(0x80 | (tmp & 0x3f));
-    } else {
-      // one byte.
-      *(m_buf++) = tmp;
-    }
-  }
-
-  // this will lose the character set encoding.
-  inline void encodeChar(const wchar_t value) {
-    uint16_t c = static_cast<uint16_t>(value);
-    if (c == 0) {
-      *(m_buf++) = 0xc0;
-      *(m_buf++) = 0x80;
-    } else if (c < 0x80) {  // ASCII character
-      *(m_buf++) = static_cast<uint8_t>(c);
-    } else if (c < 0x800) {
-      *(m_buf++) = static_cast<uint8_t>(0xC0 | c >> 6);
-      *(m_buf++) = static_cast<uint8_t>(0x80 | (c & 0x3F));
-    } else {
-      *(m_buf++) = static_cast<uint8_t>(0xE0 | c >> 12);
-      *(m_buf++) = static_cast<uint8_t>(0x80 | ((c >> 6) & 0x3F));
-      *(m_buf++) = static_cast<uint8_t>(0x80 | (c & 0x3F));
-    }
-  }
-
-  inline void writeNoCheck(uint8_t value) { *(m_buf++) = value; }
-
-  inline void writeNoCheck(int8_t value) {
-    writeNoCheck(static_cast<uint8_t>(value));
-  }
-
-  static uint8_t* checkoutBuffer(uint32_t* size);
-  static void checkinBuffer(uint8_t* buffer, uint32_t size);
-
-  // disable copy constructor and assignment
-  DataOutput(const DataOutput&);
-  DataOutput& operator=(const DataOutput&);
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_GFCPP_DATAOUTPUT_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/Delta.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/Delta.hpp b/src/cppcache/include/gfcpp/Delta.hpp
deleted file mode 100644
index 2d6ee6f..0000000
--- a/src/cppcache/include/gfcpp/Delta.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_DELTA_H_
-#define GEODE_GFCPP_DELTA_H_
-
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file
- */
-
-#include "Cacheable.hpp"
-#include "DataInput.hpp"
-#include "DataOutput.hpp"
-namespace apache {
-namespace geode {
-namespace client {
-
-/**
- * This interface is used for delta propagation.
- * To use delta propagation, an application class must derive from <code>class
- * Delta</code> as well as <code>class Cacheable</code> publicly.
- * The methods <code>hasDelta( ), toDelta( )</code> and <code>fromDelta(
- * )</code> must be implemented by the class, as these methods are used by
- * Geode
- * to detect the presence of delta in an object, to serialize the delta, and to
- * apply a serialized delta to an existing object
- * of the class.
- */
-
-class Delta {
- public:
-  /**
-   * <code>hasDelta( )</code> is invoked by Geode during <code>Region::put(
-   * CacheableKeyPtr, CacheablePtr )</code> to determine if the object contains
-   * a delta.
-   * If <code>hasDelta( )</code> returns true, the delta in the object is
-   * serialized by invoking <code>Delta::toDelta( DataOutput& )</code>.
-   * If <code>hasDelta( )</code> returns false, the object is serialized by
-   * invoking <code>Cacheable::toData( DataOutput& )</code>.
-   */
-  virtual bool hasDelta() = 0;
-
-  /**
-   * Writes out delta information to out in a user-defined format. This is
-   * invoked on an application object after Geode determines the presence
-   * of delta in it by calling <code>hasDelta()</code> on the object.
-   *
-   * @throws IOException
-   */
-  virtual void toDelta(DataOutput& out) const = 0;
-
-  /**
-   * Reads in delta information to this object in a user-defined format. This is
-   * invoked on an existing application object after Geode determines the
-   * presence of delta in <code>DataInput</code> instance.
-   *
-   * @throws IOException
-   * @throws InvalidDeltaException if the delta in the <code>DataInput</code>
-   * instance cannot be applied
-   * to this instance (possible causes may include mismatch of Delta version or
-   * logic error).
-   */
-  virtual void fromDelta(DataInput& in) = 0;
-
-  /**
-   * Creates a copy of the object on which delta is to be applied via
-   * notification.
-   * The region attribute for cloning must be set to 'true' in order to enable
-   * cloning.
-   * The default implementation of this method creates an object clone by first
-   * serializing the object into
-   * a buffer, then deserializing from the buffer thus creating a clone of the
-   * original.
-   */
-  virtual DeltaPtr clone();
-
-  virtual ~Delta() {}
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-
-#endif // GEODE_GFCPP_DELTA_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/DiskPolicyType.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/DiskPolicyType.hpp b/src/cppcache/include/gfcpp/DiskPolicyType.hpp
deleted file mode 100644
index f46f45d..0000000
--- a/src/cppcache/include/gfcpp/DiskPolicyType.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_DISKPOLICYTYPE_H_
-#define GEODE_GFCPP_DISKPOLICYTYPE_H_
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file
- */
-#include "gfcpp_globals.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-/**
- * @class DiskPolicyType DiskPolicyType.hpp
- * Enumerated type for disk policy.
- * @see RegionAttributes::getDiskPolicy
- * @see AttributesFactory::setDiskPolicy
- */
-class CPPCACHE_EXPORT DiskPolicyType {
-  // public static methods
- public:
-  /**
-   * Values for setting PolicyType.
-   */
-  typedef enum { NONE = 0, OVERFLOWS, PERSIST } PolicyType;
-
-  /** Returns the Name of the Lru action represented by specified ordinal. */
-  static const char* fromOrdinal(const uint8_t ordinal);
-
-  /** Returns the type of the Lru action represented by name. */
-  static PolicyType fromName(const char* name);
-
-  /** Returns whether this is one of the overflow to disk type.
-   * @return true if this is any action other than NONE
-   */
-  inline static bool isOverflow(const PolicyType type) {
-    return (type == DiskPolicyType::OVERFLOWS);
-  }
-
-  /** Return whether this is <code>NONE</code>. */
-  inline static bool isNone(const PolicyType type) {
-    return (type == DiskPolicyType::NONE);
-  }
-  /** Return whether this is <code>persist</code>. */
-  inline static bool isPersist(const PolicyType type) {
-    return (type == DiskPolicyType::PERSIST);
-  }
-
- private:
-  /** No instance allowed. */
-  DiskPolicyType(){};
-  static const char* names[];
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_GFCPP_DISKPOLICYTYPE_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/DistributedSystem.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/DistributedSystem.hpp b/src/cppcache/include/gfcpp/DistributedSystem.hpp
deleted file mode 100644
index de8c870..0000000
--- a/src/cppcache/include/gfcpp/DistributedSystem.hpp
+++ /dev/null
@@ -1,129 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_DISTRIBUTEDSYSTEM_H_
-#define GEODE_GFCPP_DISTRIBUTEDSYSTEM_H_
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file
- */
-
-#include "gfcpp_globals.hpp"
-#include "gf_types.hpp"
-#include "ExceptionTypes.hpp"
-#include "Properties.hpp"
-#include "VectorT.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-/**
- * @class DistributedSystem DistributedSystem.hpp
- * DistributedSystem encapsulates this applications "connection" into the
- * Geode Java servers distributed system. In order to participate in the
- * Geode Java servers distributed system, each application needs to connect to
- * the DistributedSystem.
- * Each application can only be connected to one DistributedSystem.
- */
-class SystemProperties;
-class DistributedSystemImpl;
-class CacheRegionHelper;
-class DiffieHellman;
-class TcrConnection;
-
-class CPPCACHE_EXPORT DistributedSystem : public SharedBase {
-  /**
-   * @brief public methods
-   */
- public:
-  /**
-   * Initializes the Native Client system to be able to connect to the
-   * Geode Java servers. If the name string is empty, then the default
-   * "NativeDS" is used as the name of distributed system.
-   * @throws LicenseException if no valid license is found.
-   * @throws IllegalStateException if GFCPP variable is not set and
-   *   product installation directory cannot be determined
-   * @throws IllegalArgument exception if DS name is NULL
-   * @throws AlreadyConnectedException if this call has succeeded once before
-   *for this process
-   **/
-  static DistributedSystemPtr connect(const char* name,
-                                      const PropertiesPtr& configPtr = NULLPTR);
-
-  /**
-   *@brief disconnect from the distributed system
-   *@throws IllegalStateException if not connected
-   */
-  static void disconnect();
-
-  /** Returns the SystemProperties that were used to create this instance of the
-   *  DistributedSystem
-   * @return  SystemProperties
-   */
-  static SystemProperties* getSystemProperties();
-
-  /** Returns the name that identifies the distributed system instance
-   * @return  name
-   */
-  virtual const char* getName() const;
-
-  /** Returns  true if connected, false otherwise
-   *
-   * @return  true if connected, false otherwise
-   */
-  static bool isConnected();
-
-  /** Returns a pointer to the DistributedSystem instance
-   *
-   * @return  instance
-   */
-  static DistributedSystemPtr getInstance();
-
-  /**
-   * @brief destructor
-   */
-  virtual ~DistributedSystem();
-
- protected:
-  /**
-   * @brief constructors
-   */
-  DistributedSystem(const char* name);
-
- private:
-  char* m_name;
-  static bool m_connected;
-  static DistributedSystemPtr* m_instance_ptr;
-  // static DistributedSystemImpl *m_impl;
-
- public:
-  static DistributedSystemImpl* m_impl;
-  friend class CacheRegionHelper;
-  friend class DistributedSystemImpl;
-  friend class TcrConnection;
-
- private:
-  DistributedSystem(const DistributedSystem&);
-  const DistributedSystem& operator=(const DistributedSystem&);
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_GFCPP_DISTRIBUTEDSYSTEM_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/EntryEvent.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/EntryEvent.hpp b/src/cppcache/include/gfcpp/EntryEvent.hpp
deleted file mode 100644
index d492fa5..0000000
--- a/src/cppcache/include/gfcpp/EntryEvent.hpp
+++ /dev/null
@@ -1,96 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_ENTRYEVENT_H_
-#define GEODE_GFCPP_ENTRYEVENT_H_
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-#include "gfcpp_globals.hpp"
-#include "gf_types.hpp"
-#include "Region.hpp"
-#include "CacheableKey.hpp"
-#include "UserData.hpp"
-
-/** @file
-*/
-
-namespace apache {
-namespace geode {
-namespace client {
-
-/** Represents an entry event affecting an entry, including its identity and the
- * the circumstances of the event. */
-class CPPCACHE_EXPORT EntryEvent : public apache::geode::client::SharedBase {
- protected:
-  RegionPtr m_region;      /**< Region */
-  CacheableKeyPtr m_key;   /**< Cacheable key */
-  CacheablePtr m_oldValue; /**< Old value */
-  CacheablePtr m_newValue; /**< New value */
-  UserDataPtr
-      m_callbackArgument; /**< Callback argument for this event, if any. */
-  bool m_remoteOrigin;    /**< True if from a remote (non-local) process */
-
- public:
-  /** Constructor, given all values. */
-  EntryEvent(const RegionPtr& region, const CacheableKeyPtr& key,
-             const CacheablePtr& oldValue, const CacheablePtr& newValue,
-             const UserDataPtr& aCallbackArgument, const bool remoteOrigin);
-
-  /** Destructor. */
-  virtual ~EntryEvent();
-
-  /** Constructor. */
-  EntryEvent();
-
-  /** @return the region this event occurred in. */
-  inline RegionPtr getRegion() const { return m_region; }
-
-  /** @return the key this event describes. */
-  inline CacheableKeyPtr getKey() const { return m_key; }
-
-  /** If the prior state of the entry was invalid, or non-existent/destroyed,
-   * then the old value will be NULLPTR.
-   * @return the old value in the cache.
-   */
-  inline CacheablePtr getOldValue() const { return m_oldValue; }
-
-  /** If the event is a destroy or invalidate operation, then the new value
-   * will be NULLPTR.
-   * @return the updated value from this event
-   */
-  inline CacheablePtr getNewValue() const { return m_newValue; }
-
-  /**
-   * Returns the callbackArgument passed to the method that generated
-   * this event. See the {@link Region} interface methods that take
-   * a callbackArgument parameter.
-   */
-  inline UserDataPtr getCallbackArgument() const { return m_callbackArgument; }
-
-  /** If the event originated in a remote process, returns true. */
-  inline bool remoteOrigin() const { return m_remoteOrigin; }
-
- private:
-  // never implemented.
-  EntryEvent(const EntryEvent& other);
-  void operator=(const EntryEvent& other);
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_GFCPP_ENTRYEVENT_H_

http://git-wip-us.apache.org/repos/asf/geode-native/blob/fd58b100/src/cppcache/include/gfcpp/Exception.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/gfcpp/Exception.hpp b/src/cppcache/include/gfcpp/Exception.hpp
deleted file mode 100644
index f790533..0000000
--- a/src/cppcache/include/gfcpp/Exception.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-#pragma once
-
-#ifndef GEODE_GFCPP_EXCEPTION_H_
-#define GEODE_GFCPP_EXCEPTION_H_
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file
- */
-
-#include "gfcpp_globals.hpp"
-#include "gf_types.hpp"
-
-namespace apache {
-namespace geode {
-namespace client {
-
-#define GF_EX_MSG_LIMIT 2048
-
-class Exception;
-typedef SharedPtr<Exception> ExceptionPtr;
-
-class DistributedSystem;
-
-/**
- * @class Exception Exception.hpp
- * A description of an exception that occurred during a cache operation.
- */
-class CPPCACHE_EXPORT Exception : public SharedBase {
-  /**
-   * @brief public methods
-   */
- public:
-  /** Creates an exception.
-   * @param  msg1 message pointer, this is copied into the exception.
-   * @param  msg2 optional extra message pointer, appended to msg1.
-   * @param  forceTrace enables a stacktrace for this exception regardless of
-   * stacktrace-enabled system property.
-   * @param  cause optional cause of the exception which can be later
-   *               retrieved using <code>getCause</code>
-   **/
-  Exception(const char* msg1, const char* msg2 = NULL, bool forceTrace = false,
-            const ExceptionPtr& cause = NULLPTR);
-
-  /** Creates an exception as a copy of the given other exception.
-   * @param  other the original exception.
-   *
-   **/
-  Exception(const Exception& other);
-
-  /** Create a clone of this exception. */
-  virtual Exception* clone() const;
-
-  /**
-   * @brief destructor
-   */
-  virtual ~Exception();
-
-  /** Returns the message pointer
-   *
-   * @return  message pointer
-   */
-  virtual const char* getMessage() const;
-  /** Show the message pointer
-   *
-   */
-  virtual void showMessage() const;
-
-  /** On some platforms, print a stacktrace from the location the exception
-    * was created.
-    */
-  virtual void printStackTrace() const;
-
-#ifndef _SOLARIS
-  /** On some platforms, get a stacktrace string from the location the
-    * exception was created.
-    */
-  virtual size_t getStackTrace(char* buffer, size_t maxLength) const;
-#endif
-
-  /** Return the name of this exception type. */
-  virtual const char* getName() const;
-
-  /**
-   * Throw polymorphically; this allows storing an exception object
-   * pointer and throwing it later.
-   */
-  virtual void raise() { throw * this; }
-
-  inline ExceptionPtr getCause() const { return m_cause; }
-
- protected:
-  /** internal constructor used to clone this exception */
-  Exception(const CacheableStringPtr& message, const StackTracePtr& stack,
-            const ExceptionPtr& cause);
-
-  static bool s_exceptionStackTraceEnabled;
-
-  CacheableStringPtr m_message;  // error message
-  StackTracePtr m_stack;
-  ExceptionPtr m_cause;
-
- private:
-  static void setStackTraces(bool stackTraceEnabled);
-
-  friend class DistributedSystem;
-};
-}  // namespace client
-}  // namespace geode
-}  // namespace apache
-
-#endif // GEODE_GFCPP_EXCEPTION_H_


Mime
View raw message