You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by mm...@apache.org on 2021/06/26 12:41:54 UTC
[geode-native] branch develop updated: GEODE-9401: fix duplicate
defines mac (#825)
This is an automated email from the ASF dual-hosted git repository.
mmartell pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new db9f9f2 GEODE-9401: fix duplicate defines mac (#825)
db9f9f2 is described below
commit db9f9f2e4caae97444a5db6d9a6b7b1b653ff6a7
Author: Michael Martell <mm...@pivotal.io>
AuthorDate: Sat Jun 26 05:41:45 2021 -0700
GEODE-9401: fix duplicate defines mac (#825)
* Refactor rename constants PdxTypes::BYTE_SIZE, PAGE_SIZE and similar variables
* Follow style guide naming convention for constants
---
clicache/src/impl/PdxFieldType.cpp | 18 ++++-----
clicache/src/impl/PdxInstanceFactoryImpl.cpp | 18 ++++-----
clicache/src/impl/PdxReaderWithTypeCollector.cpp | 26 ++++++-------
clicache/src/impl/PdxWriterWithTypeCollector.cpp | 26 ++++++-------
.../integration-test/testOverflowPutGetSqLite.cpp | 12 +++---
cppcache/src/PdxFieldType.cpp | 44 +++++++++++-----------
cppcache/src/PdxInstanceFactory.cpp | 20 +++++-----
cppcache/src/PdxReaderWithTypeCollector.cpp | 36 +++++++++---------
cppcache/src/PdxTypes.hpp | 18 ++++-----
cppcache/src/PdxWriterWithTypeCollector.cpp | 18 ++++-----
cppcache/test/PdxTypeTest.cpp | 12 +++---
11 files changed, 124 insertions(+), 124 deletions(-)
diff --git a/clicache/src/impl/PdxFieldType.cpp b/clicache/src/impl/PdxFieldType.cpp
index 543fcd4..87ad5b7 100644
--- a/clicache/src/impl/PdxFieldType.cpp
+++ b/clicache/src/impl/PdxFieldType.cpp
@@ -166,23 +166,23 @@ namespace Apache
switch (m_typeId)
{
case PdxFieldTypes::BYTE:
- return PdxTypes::BYTE_SIZE;
+ return PdxTypes::kPdxByteSize;
case PdxFieldTypes::BOOLEAN:
- return PdxTypes::BOOLEAN_SIZE;
+ return PdxTypes::kPdxBooleanSize;
case PdxFieldTypes::SHORT:
- return PdxTypes::SHORT_SIZE;
+ return PdxTypes::kPdxShortSize;
case PdxFieldTypes::CHAR:
- return PdxTypes::CHAR_SIZE;
+ return PdxTypes::kPdxCharSize;
case PdxFieldTypes::INT:
- return PdxTypes::INTEGER_SIZE;
+ return PdxTypes::kPdxIntegerSize;
case PdxFieldTypes::FLOAT:
- return PdxTypes::FLOAT_SIZE;
+ return PdxTypes::kPdxFloatSize;
case PdxFieldTypes::LONG:
- return PdxTypes::LONG_SIZE;
+ return PdxTypes::kPdxLongSize;
case PdxFieldTypes::DOUBLE:
- return PdxTypes::DOUBLE_SIZE;
+ return PdxTypes::kPdxDoubleSize;
case PdxFieldTypes::DATE:
- return PdxTypes::DATE_SIZE;
+ return PdxTypes::kPdxDateSize;
default:
return -1;
diff --git a/clicache/src/impl/PdxInstanceFactoryImpl.cpp b/clicache/src/impl/PdxInstanceFactoryImpl.cpp
index 5b09927..fb9af97 100644
--- a/clicache/src/impl/PdxInstanceFactoryImpl.cpp
+++ b/clicache/src/impl/PdxInstanceFactoryImpl.cpp
@@ -64,7 +64,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteChar(String^ fieldName, Char value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::CHAR_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::kPdxCharSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -72,7 +72,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteBoolean(String^ fieldName, Boolean value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::BOOLEAN_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::kPdxBooleanSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -80,7 +80,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteByte(String^ fieldName, SByte value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -88,7 +88,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteShort(String^ fieldName, Int16 value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -96,7 +96,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteInt(String^ fieldName, Int32 value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -104,7 +104,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteLong(String^ fieldName, Int64 value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -112,7 +112,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteFloat(String^ fieldName, float value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::FLOAT_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::kPdxFloatSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -120,7 +120,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteDouble(String^ fieldName, double value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::DOUBLE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::kPdxDoubleSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
@@ -128,7 +128,7 @@ namespace Apache
IPdxInstanceFactory^ PdxInstanceFactoryImpl::WriteDate(String^ fieldName, System::DateTime value)
{
isFieldAdded(fieldName);
- m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::DATE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::kPdxDateSize);
m_FieldVsValues->Add(fieldName, value);
return this;
}
diff --git a/clicache/src/impl/PdxReaderWithTypeCollector.cpp b/clicache/src/impl/PdxReaderWithTypeCollector.cpp
index 4380e4a..4dbe6c3 100644
--- a/clicache/src/impl/PdxReaderWithTypeCollector.cpp
+++ b/clicache/src/impl/PdxReaderWithTypeCollector.cpp
@@ -49,7 +49,7 @@ namespace Apache
SByte PdxReaderWithTypeCollector::ReadByte(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::BYTE, "byte");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -65,7 +65,7 @@ namespace Apache
SByte PdxReaderWithTypeCollector::ReadSByte(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::BYTE, "byte");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -80,7 +80,7 @@ namespace Apache
Boolean PdxReaderWithTypeCollector::ReadBoolean(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::BOOLEAN, "boolean");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::BOOLEAN_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::kPdxBooleanSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
m_dataInput->AdvanceCursorPdx(position);
bool retVal = PdxLocalReader::ReadBoolean(fieldName);
@@ -91,7 +91,7 @@ namespace Apache
Char PdxReaderWithTypeCollector::ReadChar(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::CHAR, "char");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::CHAR_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::kPdxCharSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
m_dataInput->AdvanceCursorPdx(position);
Char retVal = PdxLocalReader::ReadChar(fieldName);
@@ -102,7 +102,7 @@ namespace Apache
System::UInt16 PdxReaderWithTypeCollector::ReadUInt16(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::SHORT, "short");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -117,7 +117,7 @@ namespace Apache
System::UInt32 PdxReaderWithTypeCollector::ReadUInt32(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::INT, "int");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -132,7 +132,7 @@ namespace Apache
System::UInt64 PdxReaderWithTypeCollector::ReadUInt64(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::LONG, "long");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -147,7 +147,7 @@ namespace Apache
short PdxReaderWithTypeCollector::ReadShort(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::SHORT, "short");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -162,7 +162,7 @@ namespace Apache
Int32 PdxReaderWithTypeCollector::ReadInt(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::INT, "int");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -177,7 +177,7 @@ namespace Apache
Int64 PdxReaderWithTypeCollector::ReadLong(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::LONG, "long");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -192,7 +192,7 @@ namespace Apache
float PdxReaderWithTypeCollector::ReadFloat(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::FLOAT, "float");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::FLOAT_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::kPdxFloatSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -207,7 +207,7 @@ namespace Apache
double PdxReaderWithTypeCollector::ReadDouble(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::DOUBLE, "double");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::DOUBLE_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::kPdxDoubleSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
@@ -284,7 +284,7 @@ namespace Apache
System::DateTime PdxReaderWithTypeCollector::ReadDate(String^ fieldName)
{
checkType(fieldName, PdxFieldTypes::DATE, "Date");
- m_newPdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::DATE_SIZE);
+ m_newPdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::kPdxDateSize);
int position = m_pdxType->GetFieldPosition(fieldName, m_offsetsBuffer, m_offsetSize, m_serializedLength);
if (position != -1)
{
diff --git a/clicache/src/impl/PdxWriterWithTypeCollector.cpp b/clicache/src/impl/PdxWriterWithTypeCollector.cpp
index 850f1f4..5530b97 100644
--- a/clicache/src/impl/PdxWriterWithTypeCollector.cpp
+++ b/clicache/src/impl/PdxWriterWithTypeCollector.cpp
@@ -103,84 +103,84 @@ namespace Apache
IPdxWriter^ PdxWriterWithTypeCollector::WriteByte(String^ fieldName, SByte value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
PdxLocalWriter::WriteByte(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteSByte(String^ fieldName, SByte value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::BYTE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE, native::PdxTypes::kPdxByteSize);
PdxLocalWriter::WriteSByte(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteBoolean(String^ fieldName, bool value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::BOOLEAN_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "boolean", PdxFieldTypes::BOOLEAN, native::PdxTypes::kPdxBooleanSize);
PdxLocalWriter::WriteBoolean(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteChar(String^ fieldName, Char value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::CHAR_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR, native::PdxTypes::kPdxCharSize);
PdxLocalWriter::WriteChar(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteUInt16(String^ fieldName, System::UInt16 value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
PdxLocalWriter::WriteUInt16(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteUInt32(String^ fieldName, System::UInt32 value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
PdxLocalWriter::WriteUInt32(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteUInt64(String^ fieldName, System::UInt64 value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
PdxLocalWriter::WriteUInt64(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteShort(String^ fieldName, System::Int16 value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::SHORT_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT, native::PdxTypes::kPdxShortSize);
PdxLocalWriter::WriteShort(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteInt(String^ fieldName, System::Int32 value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::INTEGER_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT, native::PdxTypes::kPdxIntegerSize);
PdxLocalWriter::WriteInt(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteLong(String^ fieldName, Int64 value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::LONG_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG, native::PdxTypes::kPdxLongSize);
PdxLocalWriter::WriteLong(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteFloat(String^ fieldName, float value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::FLOAT_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT, native::PdxTypes::kPdxFloatSize);
PdxLocalWriter::WriteFloat(fieldName, value);
return this;
}
IPdxWriter^ PdxWriterWithTypeCollector::WriteDouble(String^ fieldName, double value)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::DOUBLE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE, native::PdxTypes::kPdxDoubleSize);
PdxLocalWriter::WriteDouble(fieldName, value);
return this;
}
@@ -215,7 +215,7 @@ namespace Apache
IPdxWriter^ PdxWriterWithTypeCollector::WriteDate(String^ fieldName, System::DateTime date)
{
- m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::DATE_SIZE);
+ m_pdxType->AddFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE, native::PdxTypes::kPdxDateSize);
PdxLocalWriter::WriteDate(fieldName, date);
return this;
}
diff --git a/cppcache/integration-test/testOverflowPutGetSqLite.cpp b/cppcache/integration-test/testOverflowPutGetSqLite.cpp
index b595423..203e4d3 100644
--- a/cppcache/integration-test/testOverflowPutGetSqLite.cpp
+++ b/cppcache/integration-test/testOverflowPutGetSqLite.cpp
@@ -53,9 +53,9 @@ using apache::geode::client::RegionShortcut;
uint32_t numOfEnt;
std::string sqlite_dir = "SqLiteRegionData";
-static constexpr char const *MAX_PAGE_COUNT = "MaxPageCount";
-static constexpr char const *PAGE_SIZE = "PageSize";
-static constexpr char const *PERSISTENCE_DIR = "PersistenceDirectory";
+static constexpr char const *kMaxPageCountStr = "MaxPageCount";
+static constexpr char const *kPageSizeStr = "PageSize";
+static constexpr char const *kPersistenceDirStr = "PersistenceDirectory";
// Return the number of keys and values in entries map.
void getNumOfEntries(std::shared_ptr<Region> ®ionPtr, uint32_t num) {
@@ -345,9 +345,9 @@ void setSqLiteProperties(std::shared_ptr<Properties> &sqliteProperties,
int maxPageCount = 1073741823, int pageSize = 65536,
std::string pDir = sqlite_dir) {
sqliteProperties = Properties::create();
- sqliteProperties->insert(MAX_PAGE_COUNT, maxPageCount);
- sqliteProperties->insert(PAGE_SIZE, pageSize);
- sqliteProperties->insert(PERSISTENCE_DIR, pDir.c_str());
+ sqliteProperties->insert(kMaxPageCountStr, maxPageCount);
+ sqliteProperties->insert(kPageSizeStr, pageSize);
+ sqliteProperties->insert(kPersistenceDirStr, pDir.c_str());
ASSERT(sqliteProperties != nullptr,
"Expected sqlite properties to be NON-nullptr");
}
diff --git a/cppcache/src/PdxFieldType.cpp b/cppcache/src/PdxFieldType.cpp
index 188ed35..596ef00 100644
--- a/cppcache/src/PdxFieldType.cpp
+++ b/cppcache/src/PdxFieldType.cpp
@@ -32,28 +32,28 @@ namespace geode {
namespace client {
static const int32_t kFixedTypeSizes[] = {
- PdxTypes::BOOLEAN_SIZE, // BOOLEAN
- PdxTypes::BOOLEAN_SIZE, // BYTE
- PdxTypes::CHAR_SIZE, // CHAR
- PdxTypes::CHAR_SIZE, // SHORT
- PdxTypes::INTEGER_SIZE, // INT
- PdxTypes::LONG_SIZE, // LONG
- PdxTypes::INTEGER_SIZE, // FLOAT
- PdxTypes::LONG_SIZE, // DOUBLE
- PdxTypes::DATE_SIZE, // DATE
- -1, // STRING
- -1, // OBJECT
- -1, // BOOLEAN_ARRAY
- -1, // CHAR_ARRAY
- -1, // BYTE_ARRAY
- -1, // SHORT_ARRAY
- -1, // INT_ARRAY
- -1, // LONG_ARRAY
- -1, // FLOAT_ARRAY
- -1, // DOUBLE_ARRAY
- -1, // STRING_ARRAY
- -1, // OBJECT_ARRAY
- -1, // ARRAY_OF_BYTE_ARRAYS
+ PdxTypes::kPdxBooleanSize, // BOOLEAN
+ PdxTypes::kPdxBooleanSize, // BYTE
+ PdxTypes::kPdxCharSize, // CHAR
+ PdxTypes::kPdxCharSize, // SHORT
+ PdxTypes::kPdxIntegerSize, // INT
+ PdxTypes::kPdxLongSize, // LONG
+ PdxTypes::kPdxIntegerSize, // FLOAT
+ PdxTypes::kPdxLongSize, // DOUBLE
+ PdxTypes::kPdxDateSize, // DATE
+ -1, // STRING
+ -1, // OBJECT
+ -1, // BOOLEAN_ARRAY
+ -1, // CHAR_ARRAY
+ -1, // BYTE_ARRAY
+ -1, // SHORT_ARRAY
+ -1, // INT_ARRAY
+ -1, // LONG_ARRAY
+ -1, // FLOAT_ARRAY
+ -1, // DOUBLE_ARRAY
+ -1, // STRING_ARRAY
+ -1, // OBJECT_ARRAY
+ -1, // ARRAY_OF_BYTE_ARRAYS
};
PdxFieldType::PdxFieldType()
diff --git a/cppcache/src/PdxInstanceFactory.cpp b/cppcache/src/PdxInstanceFactory.cpp
index 413bcd3..faf777c 100644
--- a/cppcache/src/PdxInstanceFactory.cpp
+++ b/cppcache/src/PdxInstanceFactory.cpp
@@ -60,7 +60,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeChar(const std::string& fieldName,
char16_t value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
- PdxTypes::CHAR_SIZE);
+ PdxTypes::kPdxCharSize);
auto cacheableObject = CacheableCharacter::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -69,7 +69,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeChar(const std::string& fieldName,
char value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
- PdxTypes::CHAR_SIZE);
+ PdxTypes::kPdxCharSize);
auto cacheableObject = CacheableCharacter::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -78,7 +78,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeBoolean(
const std::string& fieldName, bool value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "bool", PdxFieldTypes::BOOLEAN,
- PdxTypes::BOOLEAN_SIZE);
+ PdxTypes::kPdxBooleanSize);
auto cacheableObject = CacheableBoolean::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -87,7 +87,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeByte(const std::string& fieldName,
int8_t value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,
- PdxTypes::BYTE_SIZE);
+ PdxTypes::kPdxByteSize);
auto cacheableObject = CacheableByte::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -96,7 +96,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeShort(const std::string& fieldName,
int16_t value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,
- PdxTypes::SHORT_SIZE);
+ PdxTypes::kPdxShortSize);
auto cacheableObject = CacheableInt16::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -105,7 +105,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeInt(const std::string& fieldName,
int32_t value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,
- PdxTypes::INTEGER_SIZE);
+ PdxTypes::kPdxIntegerSize);
auto cacheableObject = CacheableInt32::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -114,7 +114,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeLong(const std::string& fieldName,
int64_t value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,
- PdxTypes::LONG_SIZE);
+ PdxTypes::kPdxLongSize);
auto cacheableObject = CacheableInt64::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -123,7 +123,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeFloat(const std::string& fieldName,
float value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT,
- PdxTypes::FLOAT_SIZE);
+ PdxTypes::kPdxFloatSize);
auto cacheableObject = CacheableFloat::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -132,7 +132,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeDouble(
const std::string& fieldName, double value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE,
- PdxTypes::DOUBLE_SIZE);
+ PdxTypes::kPdxDoubleSize);
auto cacheableObject = CacheableDouble::create(value);
m_FieldVsValues.emplace(fieldName, cacheableObject);
return *this;
@@ -270,7 +270,7 @@ PdxInstanceFactory& PdxInstanceFactory::writeDate(
const std::string& fieldName, std::shared_ptr<CacheableDate> value) {
isFieldAdded(fieldName);
m_pdxType->addFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,
- PdxTypes::DATE_SIZE /*+ 1*/);
+ PdxTypes::kPdxDateSize /*+ 1*/);
m_FieldVsValues.emplace(fieldName, value);
return *this;
}
diff --git a/cppcache/src/PdxReaderWithTypeCollector.cpp b/cppcache/src/PdxReaderWithTypeCollector.cpp
index 974c603..b21121a 100644
--- a/cppcache/src/PdxReaderWithTypeCollector.cpp
+++ b/cppcache/src/PdxReaderWithTypeCollector.cpp
@@ -58,14 +58,14 @@ void PdxReaderWithTypeCollector::checkType(const std::string& fieldName,
char16_t PdxReaderWithTypeCollector::readChar(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::CHAR, "char");
m_newPdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
- PdxTypes::CHAR_SIZE);
+ PdxTypes::kPdxCharSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readChar()position = %d", position);
if (position != -1) {
m_dataInput->advanceCursor(position);
auto retVal = PdxLocalReader::readChar(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::CHAR_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxCharSize);
return retVal;
} else {
return 0;
@@ -75,14 +75,14 @@ char16_t PdxReaderWithTypeCollector::readChar(const std::string& fieldName) {
bool PdxReaderWithTypeCollector::readBoolean(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::BOOLEAN, "boolean");
m_newPdxType->addFixedLengthTypeField(
- fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::BOOLEAN_SIZE);
+ fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::kPdxBooleanSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readBoolean():position = %d", position);
if (position != -1) {
m_dataInput->advanceCursor(position);
bool retVal = PdxLocalReader::readBoolean(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::BOOLEAN_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxBooleanSize);
return retVal;
} else {
return 0;
@@ -92,7 +92,7 @@ bool PdxReaderWithTypeCollector::readBoolean(const std::string& fieldName) {
int8_t PdxReaderWithTypeCollector::readByte(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::BYTE, "byte");
m_newPdxType->addFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,
- PdxTypes::BYTE_SIZE);
+ PdxTypes::kPdxByteSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readByte(): position = %d", position);
@@ -100,7 +100,7 @@ int8_t PdxReaderWithTypeCollector::readByte(const std::string& fieldName) {
m_dataInput->advanceCursor(position);
int8_t retVal;
retVal = PdxLocalReader::readByte(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::BYTE_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxByteSize);
return retVal;
} else {
return 0;
@@ -110,7 +110,7 @@ int8_t PdxReaderWithTypeCollector::readByte(const std::string& fieldName) {
int16_t PdxReaderWithTypeCollector::readShort(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::SHORT, "short");
m_newPdxType->addFixedLengthTypeField(
- fieldName, "short", PdxFieldTypes::SHORT, PdxTypes::SHORT_SIZE);
+ fieldName, "short", PdxFieldTypes::SHORT, PdxTypes::kPdxShortSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readShort(): position = %d", position);
@@ -118,7 +118,7 @@ int16_t PdxReaderWithTypeCollector::readShort(const std::string& fieldName) {
int16_t value;
m_dataInput->advanceCursor(position);
value = PdxLocalReader::readShort(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::SHORT_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxShortSize);
return value;
} else {
return 0;
@@ -128,7 +128,7 @@ int16_t PdxReaderWithTypeCollector::readShort(const std::string& fieldName) {
int32_t PdxReaderWithTypeCollector::readInt(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::INT, "int");
m_newPdxType->addFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,
- PdxTypes::INTEGER_SIZE);
+ PdxTypes::kPdxIntegerSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readInt():position = %d", position);
@@ -136,7 +136,7 @@ int32_t PdxReaderWithTypeCollector::readInt(const std::string& fieldName) {
int32_t value;
m_dataInput->advanceCursor(position);
value = PdxLocalReader::readInt(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::INTEGER_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxIntegerSize);
return value;
} else {
return 0;
@@ -146,7 +146,7 @@ int32_t PdxReaderWithTypeCollector::readInt(const std::string& fieldName) {
int64_t PdxReaderWithTypeCollector::readLong(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::LONG, "long");
m_newPdxType->addFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,
- PdxTypes::LONG_SIZE);
+ PdxTypes::kPdxLongSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readLong(): position = %d", position);
@@ -154,7 +154,7 @@ int64_t PdxReaderWithTypeCollector::readLong(const std::string& fieldName) {
int64_t value;
m_dataInput->advanceCursor(position);
value = PdxLocalReader::readLong(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::LONG_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxLongSize);
return value;
} else {
return 0;
@@ -164,7 +164,7 @@ int64_t PdxReaderWithTypeCollector::readLong(const std::string& fieldName) {
float PdxReaderWithTypeCollector::readFloat(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::FLOAT, "float");
m_newPdxType->addFixedLengthTypeField(
- fieldName, "float", PdxFieldTypes::FLOAT, PdxTypes::FLOAT_SIZE);
+ fieldName, "float", PdxFieldTypes::FLOAT, PdxTypes::kPdxFloatSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readFloat():position = %d", position);
@@ -172,7 +172,7 @@ float PdxReaderWithTypeCollector::readFloat(const std::string& fieldName) {
float value;
m_dataInput->advanceCursor(position);
value = PdxLocalReader::readFloat(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::FLOAT_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxFloatSize);
return value;
} else {
return 0.0f;
@@ -182,7 +182,7 @@ float PdxReaderWithTypeCollector::readFloat(const std::string& fieldName) {
double PdxReaderWithTypeCollector::readDouble(const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::DOUBLE, "double");
m_newPdxType->addFixedLengthTypeField(
- fieldName, "double", PdxFieldTypes::DOUBLE, PdxTypes::DOUBLE_SIZE);
+ fieldName, "double", PdxFieldTypes::DOUBLE, PdxTypes::kPdxDoubleSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readDouble():position = %d", position);
@@ -190,7 +190,7 @@ double PdxReaderWithTypeCollector::readDouble(const std::string& fieldName) {
double value;
m_dataInput->advanceCursor(position);
value = PdxLocalReader::readDouble(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::DOUBLE_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxDoubleSize);
return value;
} else {
return 0.0;
@@ -486,14 +486,14 @@ std::shared_ptr<CacheableDate> PdxReaderWithTypeCollector::readDate(
const std::string& fieldName) {
checkType(fieldName, PdxFieldTypes::DATE, "Date");
m_newPdxType->addFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,
- PdxTypes::DATE_SIZE);
+ PdxTypes::kPdxDateSize);
int position = m_pdxType->getFieldPosition(fieldName, m_offsetsBuffer,
m_offsetSize, m_serializedLength);
LOGDEBUG("PdxReaderWithTypeCollector::readDate() position = %d", position);
if (position != -1) {
m_dataInput->advanceCursor(position);
auto retVal = PdxLocalReader::readDate(fieldName);
- m_dataInput->rewindCursor(position + PdxTypes::DATE_SIZE);
+ m_dataInput->rewindCursor(position + PdxTypes::kPdxDateSize);
return retVal;
} else {
return nullptr;
diff --git a/cppcache/src/PdxTypes.hpp b/cppcache/src/PdxTypes.hpp
index 75d6b4e..9d5348b 100644
--- a/cppcache/src/PdxTypes.hpp
+++ b/cppcache/src/PdxTypes.hpp
@@ -28,23 +28,23 @@ namespace client {
class PdxTypes {
public:
- static const int8_t BYTE_SIZE = 1;
+ static const int8_t kPdxByteSize = 1;
- static const int8_t BOOLEAN_SIZE = 1;
+ static const int8_t kPdxBooleanSize = 1;
- static const int8_t CHAR_SIZE = 2;
+ static const int8_t kPdxCharSize = 2;
- static const int8_t SHORT_SIZE = 2;
+ static const int8_t kPdxShortSize = 2;
- static const int8_t INTEGER_SIZE = 4;
+ static const int8_t kPdxIntegerSize = 4;
- static const int8_t FLOAT_SIZE = 4;
+ static const int8_t kPdxFloatSize = 4;
- static const int8_t LONG_SIZE = 8;
+ static const int8_t kPdxLongSize = 8;
- static const int8_t DOUBLE_SIZE = 8;
+ static const int8_t kPdxDoubleSize = 8;
- static const int8_t DATE_SIZE = 8;
+ static const int8_t kPdxDateSize = 8;
};
} // namespace client
diff --git a/cppcache/src/PdxWriterWithTypeCollector.cpp b/cppcache/src/PdxWriterWithTypeCollector.cpp
index f5add85..b656dad 100644
--- a/cppcache/src/PdxWriterWithTypeCollector.cpp
+++ b/cppcache/src/PdxWriterWithTypeCollector.cpp
@@ -106,63 +106,63 @@ PdxWriter& PdxWriterWithTypeCollector::writeUnreadFields(
PdxWriter& PdxWriterWithTypeCollector::writeChar(const std::string& fieldName,
char16_t value) {
m_pdxType->addFixedLengthTypeField(fieldName, "char", PdxFieldTypes::CHAR,
- PdxTypes::CHAR_SIZE);
+ PdxTypes::kPdxCharSize);
PdxLocalWriter::writeChar(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeBoolean(
const std::string& fieldName, bool value) {
m_pdxType->addFixedLengthTypeField(
- fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::BOOLEAN_SIZE);
+ fieldName, "boolean", PdxFieldTypes::BOOLEAN, PdxTypes::kPdxBooleanSize);
PdxLocalWriter::writeBoolean(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeByte(const std::string& fieldName,
int8_t value) {
m_pdxType->addFixedLengthTypeField(fieldName, "byte", PdxFieldTypes::BYTE,
- PdxTypes::BYTE_SIZE);
+ PdxTypes::kPdxByteSize);
PdxLocalWriter::writeByte(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeShort(const std::string& fieldName,
int16_t value) {
m_pdxType->addFixedLengthTypeField(fieldName, "short", PdxFieldTypes::SHORT,
- PdxTypes::SHORT_SIZE);
+ PdxTypes::kPdxShortSize);
PdxLocalWriter::writeShort(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeInt(const std::string& fieldName,
int32_t value) {
m_pdxType->addFixedLengthTypeField(fieldName, "int", PdxFieldTypes::INT,
- PdxTypes::INTEGER_SIZE);
+ PdxTypes::kPdxIntegerSize);
PdxLocalWriter::writeInt(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeLong(const std::string& fieldName,
int64_t value) {
m_pdxType->addFixedLengthTypeField(fieldName, "long", PdxFieldTypes::LONG,
- PdxTypes::LONG_SIZE);
+ PdxTypes::kPdxLongSize);
PdxLocalWriter::writeLong(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeFloat(const std::string& fieldName,
float value) {
m_pdxType->addFixedLengthTypeField(fieldName, "float", PdxFieldTypes::FLOAT,
- PdxTypes::FLOAT_SIZE);
+ PdxTypes::kPdxFloatSize);
PdxLocalWriter::writeFloat(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeDouble(const std::string& fieldName,
double value) {
m_pdxType->addFixedLengthTypeField(fieldName, "double", PdxFieldTypes::DOUBLE,
- PdxTypes::DOUBLE_SIZE);
+ PdxTypes::kPdxDoubleSize);
PdxLocalWriter::writeDouble(fieldName, value);
return *this;
}
PdxWriter& PdxWriterWithTypeCollector::writeDate(
const std::string& fieldName, std::shared_ptr<CacheableDate> date) {
m_pdxType->addFixedLengthTypeField(fieldName, "Date", PdxFieldTypes::DATE,
- PdxTypes::DATE_SIZE);
+ PdxTypes::kPdxDateSize);
PdxLocalWriter::writeDate(fieldName, date);
return *this;
}
diff --git a/cppcache/test/PdxTypeTest.cpp b/cppcache/test/PdxTypeTest.cpp
index d3183b2..bbca824 100644
--- a/cppcache/test/PdxTypeTest.cpp
+++ b/cppcache/test/PdxTypeTest.cpp
@@ -184,9 +184,9 @@ TEST_F(PdxTypeTest,
m_pdxType2.addVariableLengthTypeField("bar0", "string",
PdxFieldTypes::STRING);
m_pdxType2.addFixedLengthTypeField("bar1", "bool", PdxFieldTypes::BOOLEAN,
- PdxTypes::BOOLEAN_SIZE);
+ PdxTypes::kPdxBooleanSize);
m_pdxType2.addFixedLengthTypeField("bar2", "int", PdxFieldTypes::INT,
- PdxTypes::INTEGER_SIZE);
+ PdxTypes::kPdxIntegerSize);
std::hash<PdxType> type1Hash;
std::hash<PdxType> type2Hash;
@@ -201,7 +201,7 @@ TEST_F(PdxTypeTest, testSerializeJavaPdxType) {
pdx_type.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
pdx_type.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
pdx_type.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
- PdxTypes::BOOLEAN_SIZE);
+ PdxTypes::kPdxBooleanSize);
DataOutputInternal out;
pdx_type.toData(out);
@@ -222,7 +222,7 @@ TEST_F(PdxTypeTest, testSerializeNoJavaPdxType) {
pdx_type.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
pdx_type.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
pdx_type.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
- PdxTypes::BOOLEAN_SIZE);
+ PdxTypes::kPdxBooleanSize);
DataOutputInternal out;
pdx_type.toData(out);
@@ -243,7 +243,7 @@ TEST_F(PdxTypeTest, testDeserializeJavaPdxType) {
pdx_expected.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
pdx_expected.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
pdx_expected.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
- PdxTypes::BOOLEAN_SIZE);
+ PdxTypes::kPdxBooleanSize);
DataOutputInternal out;
pdx_expected.toData(out);
@@ -263,7 +263,7 @@ TEST_F(PdxTypeTest, testDeserializeNoJavaPdxType) {
pdx_expected.addVariableLengthTypeField("foo", "", PdxFieldTypes::STRING);
pdx_expected.addVariableLengthTypeField("alice", "", PdxFieldTypes::STRING);
pdx_expected.addFixedLengthTypeField("bar1", "", PdxFieldTypes::BOOLEAN,
- PdxTypes::BOOLEAN_SIZE);
+ PdxTypes::kPdxBooleanSize);
DataOutputInternal out;
pdx_expected.toData(out);