http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/Region.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/Region.cpp b/src/clicache/src/Region.cpp index 917f182..6100412 100644 --- a/src/clicache/src/Region.cpp +++ b/src/clicache/src/Region.cpp @@ -51,7 +51,7 @@ namespace Apache apache::geode::client::UserDataPtr callbackptr( Serializable::GetUnmanagedValueGeneric<Object^>(callbackArg)); apache::geode::client::CacheablePtr nativeptr(this->get(keyptr, callbackptr)); - if (nativeptr == NULLPTR) + if (nativeptr == nullptr) { throw gcnew KeyNotFoundException("The given key was not present in the region."); } @@ -111,7 +111,7 @@ namespace Apache { apache::geode::client::CacheableKeyPtr keyptr(Serializable::GetUnmanagedValueGeneric<TKey>(key)); apache::geode::client::CacheablePtr nativeptr(this->get(keyptr)); - if (nativeptr == NULLPTR) + if (nativeptr == nullptr) { throw gcnew KeyNotFoundException("The given key was not present in the region."); } @@ -184,15 +184,15 @@ namespace Apache generic<class TKey, class TValue> bool Region<TKey, TValue>::AreValuesEqual(apache::geode::client::CacheablePtr& val1, apache::geode::client::CacheablePtr& val2) { - if (val1 == NULLPTR && val2 == NULLPTR) + if (val1 == nullptr && val2 == nullptr) { return true; } - else if ((val1 == NULLPTR && val2 != NULLPTR) || (val1 != NULLPTR && val2 == NULLPTR)) + else if ((val1 == nullptr && val2 != nullptr) || (val1 != nullptr && val2 == nullptr)) { return false; } - else if (val1 != NULLPTR && val2 != NULLPTR) + else if (val1 != nullptr && val2 != nullptr) { if (val1->classId() != val2->classId() || val1->typeId() != val2->typeId()) { @@ -221,7 +221,7 @@ namespace Apache apache::geode::client::CacheableKeyPtr keyptr(Serializable::GetUnmanagedValueGeneric<TKey>(keyValuePair.Key)); apache::geode::client::CacheablePtr nativeptr(this->get(keyptr)); //This means that key is not present. - if (nativeptr == NULLPTR) { + if (nativeptr == nullptr) { return false; } TValue value = Serializable::GetManagedValueGeneric<TValue>(nativeptr); @@ -246,7 +246,7 @@ namespace Apache _GF_MG_EXCEPTION_TRY2/* due to auto replace */ apache::geode::client::CacheableKeyPtr keyptr(Serializable::GetUnmanagedValueGeneric<TKey>(key)); apache::geode::client::CacheablePtr nativeptr(this->get(keyptr)); - if (nativeptr == NULLPTR) { + if (nativeptr == nullptr) { val = TValue(); return false; } @@ -540,11 +540,11 @@ namespace Apache Serializable::GetUnmanagedValueGeneric<TKey>(item)); } - apache::geode::client::HashMapOfCacheablePtr valuesPtr(NULLPTR); + apache::geode::client::HashMapOfCacheablePtr valuesPtr(nullptr); if (values != nullptr) { valuesPtr = new apache::geode::client::HashMapOfCacheable(); } - apache::geode::client::HashMapOfExceptionPtr exceptionsPtr(NULLPTR); + apache::geode::client::HashMapOfExceptionPtr exceptionsPtr(nullptr); if (exceptions != nullptr) { exceptionsPtr = new apache::geode::client::HashMapOfException(); } @@ -591,11 +591,11 @@ namespace Apache Serializable::GetUnmanagedValueGeneric<TKey>(item)); } - apache::geode::client::HashMapOfCacheablePtr valuesPtr(NULLPTR); + apache::geode::client::HashMapOfCacheablePtr valuesPtr(nullptr); if (values != nullptr) { valuesPtr = new apache::geode::client::HashMapOfCacheable(); } - apache::geode::client::HashMapOfExceptionPtr exceptionsPtr(NULLPTR); + apache::geode::client::HashMapOfExceptionPtr exceptionsPtr(nullptr); if (exceptions != nullptr) { exceptionsPtr = new apache::geode::client::HashMapOfException(); } @@ -677,7 +677,7 @@ namespace Apache apache::geode::client::RegionPtr& nativeptr(NativePtr->getParentRegion()); - return Region::Create(nativeptr.ptr()); + return Region::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -689,7 +689,7 @@ namespace Apache apache::geode::client::RegionAttributesPtr& nativeptr(NativePtr->getAttributes()); - return Apache::Geode::Client::RegionAttributes<TKey, TValue>::Create(nativeptr.ptr()); + return Apache::Geode::Client::RegionAttributes<TKey, TValue>::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -702,7 +702,7 @@ namespace Apache apache::geode::client::AttributesMutatorPtr& nativeptr( NativePtr->getAttributesMutator()); - return Apache::Geode::Client::AttributesMutator<TKey, TValue>::Create(nativeptr.ptr()); + return Apache::Geode::Client::AttributesMutator<TKey, TValue>::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -713,7 +713,7 @@ namespace Apache _GF_MG_EXCEPTION_TRY2/* due to auto replace */ apache::geode::client::CacheStatisticsPtr& nativeptr(NativePtr->getStatistics()); - return Apache::Geode::Client::CacheStatistics::Create(nativeptr.ptr()); + return Apache::Geode::Client::CacheStatistics::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -726,7 +726,7 @@ namespace Apache ManagedString mg_path(path); apache::geode::client::RegionPtr& nativeptr( NativePtr->getSubregion(mg_path.CharPtr)); - return Region::Create(nativeptr.ptr()); + return Region::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -743,8 +743,8 @@ namespace Apache GetNativePtrFromSBWrapGeneric<apache::geode::client::RegionAttributes>(attributes)); apache::geode::client::RegionPtr& nativeptr(NativePtr->createSubregion( - mg_subregionName.CharPtr, p_attrs /*NULLPTR*/)); - return Region::Create(nativeptr.ptr()); + mg_subregionName.CharPtr, p_attrs /*nullptr*/)); + return Region::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ @@ -763,7 +763,7 @@ namespace Apache for (System::Int32 index = 0; index < vsr.size(); index++) { apache::geode::client::RegionPtr& nativeptr(vsr[index]); - subRegions[index] = Region<TKey, TValue>::Create(nativeptr.ptr()); + subRegions[index] = Region<TKey, TValue>::Create(nativeptr.get()); } System::Collections::Generic::ICollection<IRegion<TKey, TValue>^>^ collection = (System::Collections::Generic::ICollection<IRegion<TKey, TValue>^>^)subRegions; @@ -779,7 +779,7 @@ namespace Apache apache::geode::client::CacheableKeyPtr keyptr(Serializable::GetUnmanagedValueGeneric<TKey>(key)); apache::geode::client::RegionEntryPtr& nativeptr(NativePtr->getEntry(keyptr)); - return RegionEntry<TKey, TValue>::Create(nativeptr.ptr()); + return RegionEntry<TKey, TValue>::Create(nativeptr.get()); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } @@ -796,7 +796,7 @@ namespace Apache for (System::Int32 index = 0; index < vc.size(); index++) { apache::geode::client::RegionEntryPtr& nativeptr(vc[index]); - entryarr[index] = RegionEntry<TKey, TValue>::Create(nativeptr.ptr()); + entryarr[index] = RegionEntry<TKey, TValue>::Create(nativeptr.get()); } System::Collections::Generic::ICollection<RegionEntry<TKey, TValue>^>^ collection = (System::Collections::Generic::ICollection<RegionEntry<TKey, TValue>^>^)entryarr; @@ -814,15 +814,15 @@ namespace Apache apache::geode::client::RegionServicePtr& nativeptr(NativePtr->getRegionService()); - apache::geode::client::Cache* realCache = dynamic_cast<apache::geode::client::Cache*>(nativeptr.ptr()); + apache::geode::client::Cache* realCache = dynamic_cast<apache::geode::client::Cache*>(nativeptr.get()); if (realCache != NULL) { - return Apache::Geode::Client::Cache::Create(((apache::geode::client::CachePtr)nativeptr).ptr()); + return Apache::Geode::Client::Cache::Create(((apache::geode::client::CachePtr)nativeptr).get()); } else { - return Apache::Geode::Client::AuthenticatedCache::Create(nativeptr.ptr()); + return Apache::Geode::Client::AuthenticatedCache::Create(nativeptr.get()); } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ @@ -989,8 +989,7 @@ namespace Apache _GF_MG_EXCEPTION_TRY2/* due to auto replace */ if (resultKeys != nullptr) { - apache::geode::client::VectorOfCacheableKeyPtr mg_keys( - new apache::geode::client::VectorOfCacheableKey()); + auto mg_keys = std::make_shared<apache::geode::client::VectorOfCacheableKey>(); NativePtr->registerAllKeys(isDurable, mg_keys, getInitialValues, receiveValues); @@ -1000,7 +999,7 @@ namespace Apache } } else { - NativePtr->registerAllKeys(isDurable, NULLPTR, getInitialValues, receiveValues); + NativePtr->registerAllKeys(isDurable, nullptr, getInitialValues, receiveValues); } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ @@ -1097,8 +1096,7 @@ namespace Apache ManagedString mg_regex(regex); if (resultKeys != nullptr) { - apache::geode::client::VectorOfCacheableKeyPtr mg_keys( - new apache::geode::client::VectorOfCacheableKey()); + auto mg_keys = std::make_shared<apache::geode::client::VectorOfCacheableKey>(); NativePtr->registerRegex(mg_regex.CharPtr, isDurable, mg_keys, getInitialValues, receiveValues); @@ -1109,7 +1107,7 @@ namespace Apache } else { NativePtr->registerRegex(mg_regex.CharPtr, isDurable, - NULLPTR, getInitialValues, receiveValues); + nullptr, getInitialValues, receiveValues); } _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ @@ -1138,14 +1136,14 @@ namespace Apache apache::geode::client::SelectResultsPtr& nativeptr = NativePtr->query( mg_predicate.CharPtr, DEFAULT_QUERY_RESPONSE_TIMEOUT); - if (nativeptr.ptr() == NULL) return nullptr; + if (nativeptr.get() == NULL) return nullptr; apache::geode::client::ResultSet* resultptr = dynamic_cast<apache::geode::client::ResultSet*>( - nativeptr.ptr()); + nativeptr.get()); if (resultptr == NULL) { apache::geode::client::StructSet* structptr = dynamic_cast<apache::geode::client::StructSet*>( - nativeptr.ptr()); + nativeptr.get()); if (structptr == NULL) { return nullptr; @@ -1170,14 +1168,14 @@ namespace Apache apache::geode::client::SelectResultsPtr& nativeptr = NativePtr->query( mg_predicate.CharPtr, timeout); - if (nativeptr.ptr() == NULL) return nullptr; + if (nativeptr.get() == NULL) return nullptr; apache::geode::client::ResultSet* resultptr = dynamic_cast<apache::geode::client::ResultSet*>( - nativeptr.ptr()); + nativeptr.get()); if (resultptr == NULL) { apache::geode::client::StructSet* structptr = dynamic_cast<apache::geode::client::StructSet*>( - nativeptr.ptr()); + nativeptr.get()); if (structptr == NULL) { return nullptr;
http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/RegionAttributes.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/RegionAttributes.cpp b/src/clicache/src/RegionAttributes.cpp index 558dc7c..fe4d12b 100644 --- a/src/clicache/src/RegionAttributes.cpp +++ b/src/clicache/src/RegionAttributes.cpp @@ -353,7 +353,7 @@ namespace Apache { apache::geode::client::PropertiesPtr& nativeptr( NativePtr->getPersistenceProperties()); - return Properties<String^, String^>::Create<String^, String^>(nativeptr.ptr()); + return Properties<String^, String^>::Create<String^, String^>(nativeptr.get()); } } // namespace Client } // namespace Geode http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/RegionFactory.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/RegionFactory.cpp b/src/clicache/src/RegionFactory.cpp index 08f2e2d..93a5e7a 100644 --- a/src/clicache/src/RegionFactory.cpp +++ b/src/clicache/src/RegionFactory.cpp @@ -135,7 +135,7 @@ namespace Apache PersistenceManagerGeneric<TKey, TValue>^ clg = gcnew PersistenceManagerGeneric<TKey, TValue>(); clg->SetPersistenceManager(persistenceManager); persistenceManagerptr = new apache::geode::client::ManagedPersistenceManagerGeneric( /*clg,*/ persistenceManager); - ((apache::geode::client::ManagedPersistenceManagerGeneric*)persistenceManagerptr.ptr())->setptr(clg); + ((apache::geode::client::ManagedPersistenceManagerGeneric*)persistenceManagerptr.get())->setptr(clg); } apache::geode::client::PropertiesPtr configptr(GetNativePtr<apache::geode::client::Properties>( config ) ); NativePtr->setPersistenceManager( persistenceManagerptr, configptr ); @@ -263,7 +263,7 @@ namespace Apache CacheLoaderGeneric<TKey, TValue>^ clg = gcnew CacheLoaderGeneric<TKey, TValue>(); clg->SetCacheLoader(cacheLoader); loaderptr = new apache::geode::client::ManagedCacheLoaderGeneric( /*clg,*/ cacheLoader ); - ((apache::geode::client::ManagedCacheLoaderGeneric*)loaderptr.ptr())->setptr(clg); + ((apache::geode::client::ManagedCacheLoaderGeneric*)loaderptr.get())->setptr(clg); } NativePtr->setCacheLoader( loaderptr ); return this; @@ -277,7 +277,7 @@ namespace Apache CacheWriterGeneric<TKey, TValue>^ cwg = gcnew CacheWriterGeneric<TKey, TValue>(); cwg->SetCacheWriter(cacheWriter); writerptr = new apache::geode::client::ManagedCacheWriterGeneric( /*cwg,*/ cacheWriter ); - ((apache::geode::client::ManagedCacheWriterGeneric*)writerptr.ptr())->setptr(cwg); + ((apache::geode::client::ManagedCacheWriterGeneric*)writerptr.get())->setptr(cwg); } NativePtr->setCacheWriter( writerptr ); return this; @@ -291,7 +291,7 @@ namespace Apache CacheListenerGeneric<TKey, TValue>^ clg = gcnew CacheListenerGeneric<TKey, TValue>(); clg->SetCacheListener(cacheListener); listenerptr = new apache::geode::client::ManagedCacheListenerGeneric( /*clg,*/ cacheListener ); - ((apache::geode::client::ManagedCacheListenerGeneric*)listenerptr.ptr())->setptr(clg); + ((apache::geode::client::ManagedCacheListenerGeneric*)listenerptr.get())->setptr(clg); /* listenerptr = new apache::geode::client::ManagedCacheListenerGeneric( (Client::ICacheListener<Object^, Object^>^)cacheListener); @@ -312,13 +312,13 @@ namespace Apache FixedPartitionResolverGeneric<TKey, TValue>^ prg = gcnew FixedPartitionResolverGeneric<TKey, TValue>(); prg->SetPartitionResolver(resolver); resolverptr = new apache::geode::client::ManagedFixedPartitionResolverGeneric( resolver ); - ((apache::geode::client::ManagedFixedPartitionResolverGeneric*)resolverptr.ptr())->setptr(prg); + ((apache::geode::client::ManagedFixedPartitionResolverGeneric*)resolverptr.get())->setptr(prg); } else { PartitionResolverGeneric<TKey, TValue>^ prg = gcnew PartitionResolverGeneric<TKey, TValue>(); prg->SetPartitionResolver(partitionresolver); resolverptr = new apache::geode::client::ManagedPartitionResolverGeneric( partitionresolver ); - ((apache::geode::client::ManagedPartitionResolverGeneric*)resolverptr.ptr())->setptr(prg); + ((apache::geode::client::ManagedPartitionResolverGeneric*)resolverptr.get())->setptr(prg); } } NativePtr->setPartitionResolver( resolverptr ); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/ResultCollector.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ResultCollector.cpp b/src/clicache/src/ResultCollector.cpp index c5d8bf1..13220eb 100644 --- a/src/clicache/src/ResultCollector.cpp +++ b/src/clicache/src/ResultCollector.cpp @@ -37,7 +37,7 @@ namespace Apache _GF_MG_EXCEPTION_TRY2/* due to auto replace */ apache::geode::client::Serializable * result = SafeGenericMSerializableConvert((IGeodeSerializable^)rs); - NativePtr->addResult( result==NULL ? (NULLPTR) : (apache::geode::client::CacheablePtr(result)) ); + NativePtr->addResult( result==NULL ? (nullptr) : (apache::geode::client::CacheablePtr(result)) ); _GF_MG_EXCEPTION_CATCH_ALL2/* due to auto replace */ } http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/ResultSet.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/ResultSet.cpp b/src/clicache/src/ResultSet.cpp index 9ddcf6f..d3a83e7 100644 --- a/src/clicache/src/ResultSet.cpp +++ b/src/clicache/src/ResultSet.cpp @@ -46,7 +46,7 @@ namespace Apache generic<class TResult> /*IGeodeSerializable^*/TResult ResultSet<TResult>::default::get( size_t index ) { - //return SafeUMSerializableConvertGeneric(NativePtr->operator[](static_cast<System::Int32>(index)).ptr()); + //return SafeUMSerializableConvertGeneric(NativePtr->operator[](static_cast<System::Int32>(index)).get()); return (Serializable::GetManagedValueGeneric<TResult>(NativePtr->operator[](static_cast<System::Int32>(index)))); } http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/Serializable.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/Serializable.cpp b/src/clicache/src/Serializable.cpp index 0d27fbb..a6ca57c 100644 --- a/src/clicache/src/Serializable.cpp +++ b/src/clicache/src/Serializable.cpp @@ -227,7 +227,7 @@ namespace Apache IGeodeSerializable^ Serializable::GetPDXTypeById(const char* poolName, System::Int32 typeId) { SerializablePtr sPtr = apache::geode::client::SerializationRegistry::GetPDXTypeById(poolName, typeId); - return SafeUMSerializableConvertGeneric(sPtr.ptr()); + return SafeUMSerializableConvertGeneric(sPtr.get()); } int Serializable::GetEnumValue(Internal::EnumInfo^ ei) @@ -239,7 +239,7 @@ namespace Apache Internal::EnumInfo^ Serializable::GetEnum(int val) { SerializablePtr sPtr = apache::geode::client::SerializationRegistry::GetEnum(val); - return (Internal::EnumInfo^)SafeUMSerializableConvertGeneric(sPtr.ptr()); + return (Internal::EnumInfo^)SafeUMSerializableConvertGeneric(sPtr.get()); } void Serializable::RegisterPdxType(PdxTypeFactoryMethod^ creationMethod) @@ -611,7 +611,7 @@ namespace Apache generic<class TValue> TValue Serializable::GetManagedValueGeneric(apache::geode::client::SerializablePtr val) { - if (val == NULLPTR) + if (val == nullptr) { return TValue(); } @@ -689,7 +689,7 @@ namespace Apache { //TODO:: Apache::Geode::Client::CacheableDate^ ret = static_cast<Apache::Geode::Client::CacheableDate ^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableDate^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableDate^>(val.get())); System::DateTime dt(ret->Value.Ticks); return safe_cast<TValue>(dt); @@ -699,13 +699,13 @@ namespace Apache case apache::geode::client::GeodeTypeIdsImpl::CacheableUserData4: { //TODO::split - IGeodeSerializable^ ret = SafeUMSerializableConvertGeneric(val.ptr()); + IGeodeSerializable^ ret = SafeUMSerializableConvertGeneric(val.get()); return safe_cast<TValue>(ret); //return TValue(); } case apache::geode::client::GeodeTypeIdsImpl::PDX: { - IPdxSerializable^ ret = SafeUMSerializablePDXConvert(val.ptr()); + IPdxSerializable^ ret = SafeUMSerializablePDXConvert(val.get()); PdxWrapper^ pdxWrapper = dynamic_cast<PdxWrapper^>(ret); @@ -719,49 +719,49 @@ namespace Apache case apache::geode::client::GeodeTypeIds::CacheableBytes: { Apache::Geode::Client::CacheableBytes^ ret = safe_cast<Apache::Geode::Client::CacheableBytes ^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableBytes^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableBytes^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableDoubleArray: { Apache::Geode::Client::CacheableDoubleArray^ ret = safe_cast<Apache::Geode::Client::CacheableDoubleArray ^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableDoubleArray^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableDoubleArray^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableFloatArray: { Apache::Geode::Client::CacheableFloatArray^ ret = safe_cast<Apache::Geode::Client::CacheableFloatArray^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableFloatArray^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableFloatArray^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableInt16Array: { Apache::Geode::Client::CacheableInt16Array^ ret = safe_cast<Apache::Geode::Client::CacheableInt16Array^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableInt16Array^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableInt16Array^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableInt32Array: { Apache::Geode::Client::CacheableInt32Array^ ret = safe_cast<Apache::Geode::Client::CacheableInt32Array^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableInt32Array^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableInt32Array^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableInt64Array: { Apache::Geode::Client::CacheableInt64Array^ ret = safe_cast<Apache::Geode::Client::CacheableInt64Array^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableInt64Array^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableInt64Array^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableStringArray: { Apache::Geode::Client::CacheableStringArray^ ret = safe_cast<Apache::Geode::Client::CacheableStringArray^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableStringArray^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableStringArray^>(val.get())); /* array<String^>^ str = gcnew array<String^>(ret->GetValues()->Length); for(int i=0; i<ret->GetValues()->Length; i++ ) { @@ -773,100 +773,100 @@ namespace Apache case apache::geode::client::GeodeTypeIds::CacheableArrayList://Ilist generic { Apache::Geode::Client::CacheableArrayList^ ret = safe_cast<Apache::Geode::Client::CacheableArrayList^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableArrayList^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableArrayList^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableLinkedList://LinkedList generic { Apache::Geode::Client::CacheableLinkedList^ ret = safe_cast<Apache::Geode::Client::CacheableLinkedList^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableLinkedList^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableLinkedList^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableHashTable://collection::hashtable { Apache::Geode::Client::CacheableHashTable^ ret = safe_cast<Apache::Geode::Client::CacheableHashTable^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableHashTable^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableHashTable^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableHashMap://generic dictionary { Apache::Geode::Client::CacheableHashMap^ ret = safe_cast<Apache::Geode::Client::CacheableHashMap^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableHashMap^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableHashMap^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableIdentityHashMap: { Apache::Geode::Client::CacheableIdentityHashMap^ ret = static_cast<Apache::Geode::Client::CacheableIdentityHashMap^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableIdentityHashMap^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableIdentityHashMap^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableHashSet://no need of it, default case should work { Apache::Geode::Client::CacheableHashSet^ ret = static_cast<Apache::Geode::Client::CacheableHashSet^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableHashSet^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableHashSet^>(val.get())); return safe_cast<TValue>(ret); } case apache::geode::client::GeodeTypeIds::CacheableLinkedHashSet://no need of it, default case should work { Apache::Geode::Client::CacheableLinkedHashSet^ ret = static_cast<Apache::Geode::Client::CacheableLinkedHashSet^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableLinkedHashSet^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableLinkedHashSet^>(val.get())); return safe_cast<TValue>(ret); } case apache::geode::client::GeodeTypeIds::CacheableFileName: { Apache::Geode::Client::CacheableFileName^ ret = static_cast<Apache::Geode::Client::CacheableFileName^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableFileName^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableFileName^>(val.get())); return safe_cast<TValue>(ret); } case apache::geode::client::GeodeTypeIds::CacheableObjectArray: { Apache::Geode::Client::CacheableObjectArray^ ret = static_cast<Apache::Geode::Client::CacheableObjectArray^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableObjectArray^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableObjectArray^>(val.get())); return safe_cast<TValue>(ret); } case apache::geode::client::GeodeTypeIds::CacheableVector://collection::arraylist { Apache::Geode::Client::CacheableVector^ ret = static_cast<Apache::Geode::Client::CacheableVector^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableVector^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableVector^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CacheableUndefined: { Apache::Geode::Client::CacheableUndefined^ ret = static_cast<Apache::Geode::Client::CacheableUndefined^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableUndefined^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableUndefined^>(val.get())); return safe_cast<TValue>(ret); } case apache::geode::client::GeodeTypeIds::Struct: { - return safe_cast<TValue>(Apache::Geode::Client::Struct::Create(val.ptr())); + return safe_cast<TValue>(Apache::Geode::Client::Struct::Create(val.get())); } case apache::geode::client::GeodeTypeIds::CacheableStack: { Apache::Geode::Client::CacheableStack^ ret = static_cast<Apache::Geode::Client::CacheableStack^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableStack^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableStack^>(val.get())); return safe_cast<TValue>(ret->Value); } case 7: //GeodeClassIds::CacheableManagedObject { Apache::Geode::Client::CacheableObject^ ret = static_cast<Apache::Geode::Client::CacheableObject^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableObject^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableObject^>(val.get())); return safe_cast<TValue>(ret); } case 8://GeodeClassIds::CacheableManagedObjectXml { Apache::Geode::Client::CacheableObjectXml^ ret = static_cast<Apache::Geode::Client::CacheableObjectXml^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableObjectXml^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CacheableObjectXml^>(val.get())); return safe_cast<TValue>(ret); } /* TODO: replace with IDictionary<K, V> case apache::geode::client::GeodeTypeIds::Properties: { Apache::Geode::Client::Properties^ ret = safe_cast<Apache::Geode::Client::Properties^> - ( SafeGenericUMSerializableConvert<Apache::Geode::Client::Properties^>(val.ptr())); + ( SafeGenericUMSerializableConvert<Apache::Geode::Client::Properties^>(val.get())); return safe_cast<TValue>(ret); }*/ @@ -874,21 +874,21 @@ namespace Apache case apache::geode::client::GeodeTypeIds::BooleanArray: { Apache::Geode::Client::BooleanArray^ ret = safe_cast<Apache::Geode::Client::BooleanArray^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::BooleanArray^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::BooleanArray^>(val.get())); return safe_cast<TValue>(ret->Value); } case apache::geode::client::GeodeTypeIds::CharArray: { Apache::Geode::Client::CharArray^ ret = safe_cast<Apache::Geode::Client::CharArray^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::CharArray^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::CharArray^>(val.get())); return safe_cast<TValue>(ret->Value); } case 0://UserFunctionExecutionException unregistered { Apache::Geode::Client::UserFunctionExecutionException^ ret = static_cast<Apache::Geode::Client::UserFunctionExecutionException^> - (SafeGenericUMSerializableConvert<Apache::Geode::Client::UserFunctionExecutionException^>(val.ptr())); + (SafeGenericUMSerializableConvert<Apache::Geode::Client::UserFunctionExecutionException^>(val.get())); return safe_cast<TValue>(ret); } default: @@ -905,7 +905,7 @@ namespace Apache //System::Type^ managedType = key->GetType(); return GetUnmanagedValueGeneric(key->GetType(), key); } - return NULLPTR; + return nullptr; } generic<class TKey> @@ -916,7 +916,7 @@ namespace Apache //System::Type^ managedType = key->GetType(); return GetUnmanagedValueGeneric(key->GetType(), key, isAciiChar); } - return NULLPTR; + return nullptr; } void Serializable::RegisterPdxSerializer(IPdxSerializer^ pdxSerializer) @@ -1271,7 +1271,7 @@ namespace Apache String^ Serializable::GetString(apache::geode::client::CacheableStringPtr cStr)//apache::geode::client::CacheableString* { - if (cStr == NULLPTR) { + if (cStr == nullptr) { return nullptr; } else if (cStr->isWideString()) { @@ -1287,7 +1287,7 @@ namespace Apache //byte Byte Serializable::getByte(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableByte* ci = static_cast<apache::geode::client::CacheableByte*>(nativeptr.ptr()); + apache::geode::client::CacheableByte* ci = static_cast<apache::geode::client::CacheableByte*>(nativeptr.get()); return ci->value(); } @@ -1299,7 +1299,7 @@ namespace Apache //boolean bool Serializable::getBoolean(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableBoolean* ci = static_cast<apache::geode::client::CacheableBoolean*>(nativeptr.ptr()); + apache::geode::client::CacheableBoolean* ci = static_cast<apache::geode::client::CacheableBoolean*>(nativeptr.get()); return ci->value(); } @@ -1311,7 +1311,7 @@ namespace Apache //widechar Char Serializable::getChar(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableWideChar* ci = static_cast<apache::geode::client::CacheableWideChar*>(nativeptr.ptr()); + apache::geode::client::CacheableWideChar* ci = static_cast<apache::geode::client::CacheableWideChar*>(nativeptr.get()); return ci->value(); } @@ -1323,7 +1323,7 @@ namespace Apache //double double Serializable::getDouble(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableDouble* ci = static_cast<apache::geode::client::CacheableDouble*>(nativeptr.ptr()); + apache::geode::client::CacheableDouble* ci = static_cast<apache::geode::client::CacheableDouble*>(nativeptr.get()); return ci->value(); } @@ -1335,7 +1335,7 @@ namespace Apache //float float Serializable::getFloat(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableFloat* ci = static_cast<apache::geode::client::CacheableFloat*>(nativeptr.ptr()); + apache::geode::client::CacheableFloat* ci = static_cast<apache::geode::client::CacheableFloat*>(nativeptr.get()); return ci->value(); } @@ -1347,7 +1347,7 @@ namespace Apache //int16 System::Int16 Serializable::getInt16(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableInt16* ci = static_cast<apache::geode::client::CacheableInt16*>(nativeptr.ptr()); + apache::geode::client::CacheableInt16* ci = static_cast<apache::geode::client::CacheableInt16*>(nativeptr.get()); return ci->value(); } @@ -1359,7 +1359,7 @@ namespace Apache //int32 System::Int32 Serializable::getInt32(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableInt32* ci = static_cast<apache::geode::client::CacheableInt32*>(nativeptr.ptr()); + apache::geode::client::CacheableInt32* ci = static_cast<apache::geode::client::CacheableInt32*>(nativeptr.get()); return ci->value(); } @@ -1371,7 +1371,7 @@ namespace Apache //int64 System::Int64 Serializable::getInt64(apache::geode::client::SerializablePtr nativeptr) { - apache::geode::client::CacheableInt64* ci = static_cast<apache::geode::client::CacheableInt64*>(nativeptr.ptr()); + apache::geode::client::CacheableInt64* ci = static_cast<apache::geode::client::CacheableInt64*>(nativeptr.get()); return ci->value(); } @@ -1383,7 +1383,7 @@ namespace Apache //cacheable ascii string String^ Serializable::getASCIIString(apache::geode::client::SerializablePtr nativeptr) { - //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.ptr()); + //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.get()); //return GetString(ci); return GetString(nativeptr->toString()); } @@ -1401,7 +1401,7 @@ namespace Apache //cacheable ascii string huge String^ Serializable::getASCIIStringHuge(apache::geode::client::SerializablePtr nativeptr) { - //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.ptr()); + //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.get()); //return GetString(ci); return GetString(nativeptr->toString()); } @@ -1414,7 +1414,7 @@ namespace Apache //cacheable string String^ Serializable::getUTFString(apache::geode::client::SerializablePtr nativeptr) { - //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.ptr()); + //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.get()); //return GetString(ci); return GetString(nativeptr->toString()); } @@ -1427,7 +1427,7 @@ namespace Apache //cacheable string huge String^ Serializable::getUTFStringHuge(apache::geode::client::SerializablePtr nativeptr) { - //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.ptr()); + //apache::geode::client::CacheableString* ci = static_cast<apache::geode::client::CacheableString*>(nativeptr.get()); //return GetString(ci); return GetString(nativeptr->toString()); } @@ -1476,7 +1476,7 @@ namespace Apache /* static String^ GetString(apache::geode::client::CacheableStringPtr cStr)//apache::geode::client::CacheableString* { - if (cStr == NULLPTR) { + if (cStr == nullptr) { return nullptr; } else if (cStr->isWideString()) { http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/Serializable.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/Serializable.hpp b/src/clicache/src/Serializable.hpp index c7f5b44..9c5dc4d 100644 --- a/src/clicache/src/Serializable.hpp +++ b/src/clicache/src/Serializable.hpp @@ -390,7 +390,7 @@ namespace Apache /* static String^ GetString(apache::geode::client::CacheableStringPtr cStr)//apache::geode::client::CacheableString* { - if (cStr == NULLPTR) { + if (cStr == nullptr) { return nullptr; } else if (cStr->isWideString()) { http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/Struct.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/Struct.cpp b/src/clicache/src/Struct.cpp index 297ca6a..6613ec0 100644 --- a/src/clicache/src/Struct.cpp +++ b/src/clicache/src/Struct.cpp @@ -34,7 +34,7 @@ namespace Apache Object^ Struct::default::get( size_t index ) { /* return SafeUMSerializableConvertGeneric(static_cast<apache::geode::client::Struct*>( - NativePtr())->operator[](static_cast<System::Int32>(index)).ptr());*/ + NativePtr())->operator[](static_cast<System::Int32>(index)).get());*/ return (Serializable::GetManagedValueGeneric<Object^>(static_cast<apache::geode::client::Struct*>( NativePtr())->operator[](static_cast<System::Int32>(index)))); } @@ -43,7 +43,7 @@ namespace Apache { ManagedString mg_fieldName( fieldName ); /*return SafeUMSerializableConvertGeneric(static_cast<apache::geode::client::Struct*>( - NativePtr())->operator[](mg_fieldName.CharPtr).ptr());*/ + NativePtr())->operator[](mg_fieldName.CharPtr).get());*/ return (Serializable::GetManagedValueGeneric</*TResult*/Object^>(static_cast<apache::geode::client::Struct*>( NativePtr())->operator[](mg_fieldName.CharPtr))); @@ -52,7 +52,7 @@ namespace Apache StructSet<Object^>^ Struct::Set::get( ) { return StructSet</*TResult*/Object^>::Create(static_cast<apache::geode::client::Struct*>( - NativePtr())->getStructSet().ptr()); + NativePtr())->getStructSet().get()); } @@ -69,7 +69,7 @@ namespace Apache Object^ Struct/*<TResult>*/::Next( ) { /*return SafeUMSerializableConvertGeneric(static_cast<apache::geode::client::Struct*>( - NativePtr())->next().ptr());*/ + NativePtr())->next().get());*/ return (Serializable::GetManagedValueGeneric</*TResult*/Object^>(static_cast<apache::geode::client::Struct*>( NativePtr())->next())); } // namespace Client http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/StructSet.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/StructSet.cpp b/src/clicache/src/StructSet.cpp index 1922ffe..4810d6b 100644 --- a/src/clicache/src/StructSet.cpp +++ b/src/clicache/src/StructSet.cpp @@ -45,7 +45,7 @@ namespace Apache generic<class TResult> /*Apache::Geode::Client::IGeodeSerializable^*/ TResult StructSet<TResult>::default::get( size_t index ) { - //return SafeUMSerializableConvertGeneric((NativePtr->operator[](static_cast<System::Int32>(index))).ptr()); + //return SafeUMSerializableConvertGeneric((NativePtr->operator[](static_cast<System::Int32>(index))).get()); return Serializable::GetManagedValueGeneric<TResult>((NativePtr->operator[](static_cast<System::Int32>(index)))); } http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/CacheLoader.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/CacheLoader.hpp b/src/clicache/src/impl/CacheLoader.hpp index ecb9c52..45f1506 100644 --- a/src/clicache/src/impl/CacheLoader.hpp +++ b/src/clicache/src/impl/CacheLoader.hpp @@ -63,7 +63,7 @@ namespace Apache virtual apache::geode::client::CacheablePtr load( const apache::geode::client::RegionPtr& region, const apache::geode::client::CacheableKeyPtr& key, const apache::geode::client::UserDataPtr& helper ) { - IRegion<TKey, TValue>^ gregion = Region<TKey, TValue>::Create(region.ptr()); + IRegion<TKey, TValue>^ gregion = Region<TKey, TValue>::Create(region.get()); TKey gkey = Serializable::GetManagedValueGeneric<TKey>(key); @@ -75,7 +75,7 @@ namespace Apache virtual void close( const apache::geode::client::RegionPtr& region ) { - IRegion<TKey, TValue>^ gregion = Region<TKey, TValue>::Create(region.ptr()); + IRegion<TKey, TValue>^ gregion = Region<TKey, TValue>::Create(region.get()); m_loader->Close(gregion); } }; http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedAuthInitialize.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedAuthInitialize.cpp b/src/clicache/src/impl/ManagedAuthInitialize.cpp index 69b1a62..67fef16 100644 --- a/src/clicache/src/impl/ManagedAuthInitialize.cpp +++ b/src/clicache/src/impl/ManagedAuthInitialize.cpp @@ -175,7 +175,7 @@ namespace apache { try { Apache::Geode::Client::Properties<String^, String^>^ mprops = - Apache::Geode::Client::Properties<String^, String^>::Create<String^, String^>(securityprops.ptr()); + Apache::Geode::Client::Properties<String^, String^>::Create<String^, String^>(securityprops.get()); String^ mg_server = Apache::Geode::Client::ManagedString::Get(server); return PropertiesPtr(m_getCredentials->Invoke(mprops, mg_server)->NativePtr()); @@ -186,7 +186,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } void ManagedAuthInitializeGeneric::close() http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheListener.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheListener.cpp b/src/clicache/src/impl/ManagedCacheListener.cpp index bb637cd..56292ba 100644 --- a/src/clicache/src/impl/ManagedCacheListener.cpp +++ b/src/clicache/src/impl/ManagedCacheListener.cpp @@ -331,7 +331,7 @@ namespace apache { try { Apache::Geode::Client::IRegion<Object^, Object^>^ mregion = - Apache::Geode::Client::Region<Object^, Object^>::Create(region.ptr()); + Apache::Geode::Client::Region<Object^, Object^>::Create(region.get()); m_managedptr->Close(mregion); } @@ -346,7 +346,7 @@ namespace apache { try { Apache::Geode::Client::IRegion<Object^, Object^>^ mregion = - Apache::Geode::Client::Region<Object^, Object^>::Create(region.ptr()); + Apache::Geode::Client::Region<Object^, Object^>::Create(region.get()); m_managedptr->AfterRegionDisconnected(mregion); } catch (Apache::Geode::Client::GeodeException^ ex) { http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheLoader.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheLoader.cpp b/src/clicache/src/impl/ManagedCacheLoader.cpp index 1119a35..cba68db 100644 --- a/src/clicache/src/impl/ManagedCacheLoader.cpp +++ b/src/clicache/src/impl/ManagedCacheLoader.cpp @@ -224,7 +224,7 @@ namespace apache ICacheableKey^ mkey = SafeGenericUMKeyConvert( key.ptr( ) ); - IGeodeSerializable^ mcallbackArg = SafeGenericUMSerializableConvert(aCallbackArgument.ptr()); + IGeodeSerializable^ mcallbackArg = SafeGenericUMSerializableConvert(aCallbackArgument.get()); */ /* @@ -239,7 +239,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } void ManagedCacheLoaderGeneric::close(const RegionPtr& region) http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheWriter.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheWriter.cpp b/src/clicache/src/impl/ManagedCacheWriter.cpp index b5cee21..e9077ae 100644 --- a/src/clicache/src/impl/ManagedCacheWriter.cpp +++ b/src/clicache/src/impl/ManagedCacheWriter.cpp @@ -298,7 +298,7 @@ namespace apache { try { Apache::Geode::Client::IRegion<Object^, Object^>^ mregion = - Apache::Geode::Client::Region<Object^, Object^>::Create(rp.ptr()); + Apache::Geode::Client::Region<Object^, Object^>::Create(rp.get()); m_managedptr->Close(reinterpret_cast<Apache::Geode::Client::Region<Object^, Object^>^>(mregion)); } http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheableDelta.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheableDelta.cpp b/src/clicache/src/impl/ManagedCacheableDelta.cpp index 259198b..fb58f5a 100644 --- a/src/clicache/src/impl/ManagedCacheableDelta.cpp +++ b/src/clicache/src/impl/ManagedCacheableDelta.cpp @@ -213,7 +213,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } bool ManagedCacheableDeltaGeneric::operator ==(const apache::geode::client::CacheableKey& other) const @@ -240,7 +240,7 @@ namespace apache bool ManagedCacheableDeltaGeneric::operator == (const ManagedCacheableDeltaGeneric& other) const { try { - return m_managedptr->Equals(other.ptr()); + return m_managedptr->Equals(other.get()); } catch (Apache::Geode::Client::GeodeException^ ex) { ex->ThrowNative(); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheableDeltaBytes.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheableDeltaBytes.cpp b/src/clicache/src/impl/ManagedCacheableDeltaBytes.cpp index 8734ac5..494671d 100644 --- a/src/clicache/src/impl/ManagedCacheableDeltaBytes.cpp +++ b/src/clicache/src/impl/ManagedCacheableDeltaBytes.cpp @@ -230,7 +230,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } Apache::Geode::Client::IGeodeDelta^ @@ -288,10 +288,10 @@ namespace apache Apache::Geode::Client::IGeodeSerializable^ obj = Apache::Geode::Client::Serializable::GetTypeFactoryMethodGeneric(m_classId)(); obj->FromData(%mg_input); - bool ret = obj->Equals(other.ptr()); + bool ret = obj->Equals(other.get()); Apache::Geode::Client::Log::Debug("ManagedCacheableDeltaBytesGeneric::equal return VAL = " + ret); return ret; - //return obj->Equals(other.ptr()); + //return obj->Equals(other.get()); } catch (Apache::Geode::Client::GeodeException^ ex) { ex->ThrowNative(); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheableKey.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheableKey.cpp b/src/clicache/src/impl/ManagedCacheableKey.cpp index 9305e7b..e990c20 100644 --- a/src/clicache/src/impl/ManagedCacheableKey.cpp +++ b/src/clicache/src/impl/ManagedCacheableKey.cpp @@ -160,7 +160,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } bool ManagedCacheableKeyGeneric::operator ==(const apache::geode::client::CacheableKey& other) const @@ -191,7 +191,7 @@ namespace apache try { return static_cast<Apache::Geode::Client::ICacheableKey^>( (Apache::Geode::Client::IGeodeSerializable^)(Apache::Geode::Client::IGeodeSerializable^)m_managedptr)->Equals( - static_cast<Apache::Geode::Client::ICacheableKey^>(other.ptr())); + static_cast<Apache::Geode::Client::ICacheableKey^>(other.get())); } catch (Apache::Geode::Client::GeodeException^ ex) { ex->ThrowNative(); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCacheableKeyBytes.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCacheableKeyBytes.cpp b/src/clicache/src/impl/ManagedCacheableKeyBytes.cpp index 02f27e2..d8c5b56 100644 --- a/src/clicache/src/impl/ManagedCacheableKeyBytes.cpp +++ b/src/clicache/src/impl/ManagedCacheableKeyBytes.cpp @@ -173,7 +173,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } bool ManagedCacheableKeyBytesGeneric::operator ==(const apache::geode::client::CacheableKey& other) const @@ -214,10 +214,10 @@ namespace apache Apache::Geode::Client::IGeodeSerializable^ obj = Apache::Geode::Client::Serializable::GetTypeFactoryMethodGeneric(m_classId)(); obj->FromData(%mg_input); - bool ret = obj->Equals(other.ptr()); + bool ret = obj->Equals(other.get()); Apache::Geode::Client::Log::Debug("ManagedCacheableKeyBytesGeneric::equal return VAL = " + ret); return ret; - //return obj->Equals(other.ptr()); + //return obj->Equals(other.get()); } catch (Apache::Geode::Client::GeodeException^ ex) { ex->ThrowNative(); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedCqStatusListener.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedCqStatusListener.hpp b/src/clicache/src/impl/ManagedCqStatusListener.hpp index b0f5591..344e0c6 100644 --- a/src/clicache/src/impl/ManagedCqStatusListener.hpp +++ b/src/clicache/src/impl/ManagedCqStatusListener.hpp @@ -82,7 +82,7 @@ namespace apache { /// The error can appear while applying query condition on the event. /// e.g if the event doesn't has attributes as specified in the CQ query. /// This event does contain an error. The newValue may or may not be - /// available, and will be NULLPTR if not available. + /// available, and will be nullptr if not available. /// </summary> virtual void onError(const apache::geode::client::CqEvent& ev); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedFixedPartitionResolver.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedFixedPartitionResolver.cpp b/src/clicache/src/impl/ManagedFixedPartitionResolver.cpp index 23310f5..26f3f3b 100644 --- a/src/clicache/src/impl/ManagedFixedPartitionResolver.cpp +++ b/src/clicache/src/impl/ManagedFixedPartitionResolver.cpp @@ -225,7 +225,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } const char* ManagedFixedPartitionResolverGeneric::getName() http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedPartitionResolver.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedPartitionResolver.cpp b/src/clicache/src/impl/ManagedPartitionResolver.cpp index 5958ce5..51279c5 100644 --- a/src/clicache/src/impl/ManagedPartitionResolver.cpp +++ b/src/clicache/src/impl/ManagedPartitionResolver.cpp @@ -229,7 +229,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } const char* ManagedPartitionResolverGeneric::getName() http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedResultCollector.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedResultCollector.cpp b/src/clicache/src/impl/ManagedResultCollector.cpp index 8874eec..2ac9e0a 100644 --- a/src/clicache/src/impl/ManagedResultCollector.cpp +++ b/src/clicache/src/impl/ManagedResultCollector.cpp @@ -149,7 +149,7 @@ namespace apache void ManagedResultCollectorGeneric::addResult(CacheablePtr& result) { try { - //Apache::Geode::Client::IGeodeSerializable^ res = SafeUMSerializableConvertGeneric(result.ptr()); + //Apache::Geode::Client::IGeodeSerializable^ res = SafeUMSerializableConvertGeneric(result.get()); Object^ rs = Apache::Geode::Client::Serializable::GetManagedValueGeneric<Object^>(result); m_managedptr->AddResult(rs); //m_managedptr->AddResult( SafeUMSerializableConvert( result.ptr( ) ) ); @@ -190,7 +190,7 @@ namespace apache ex_str += mg_exStr.CharPtr; throw apache::geode::client::IllegalArgumentException(ex_str.c_str()); } - return NULLPTR; + return nullptr; } void ManagedResultCollectorGeneric::endResults() { http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedTransactionListener.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedTransactionListener.cpp b/src/clicache/src/impl/ManagedTransactionListener.cpp index be829bd..99a683b 100644 --- a/src/clicache/src/impl/ManagedTransactionListener.cpp +++ b/src/clicache/src/impl/ManagedTransactionListener.cpp @@ -204,7 +204,7 @@ namespace apache { try { Apache::Geode::Client::Log::Error("ManagedTransactionListenerGeneric::afterCommit in"); - Apache::Geode::Client::TransactionEvent mevent(te.ptr()); + Apache::Geode::Client::TransactionEvent mevent(te.get()); m_managedptr->AfterCommit(%mevent); Apache::Geode::Client::Log::Error("ManagedTransactionListenerGeneric::afterCommit in"); @@ -219,7 +219,7 @@ namespace apache void ManagedTransactionListenerGeneric::afterFailedCommit(apache::geode::client::TransactionEventPtr& te) { try { - Apache::Geode::Client::TransactionEvent mevent(te.ptr()); + Apache::Geode::Client::TransactionEvent mevent(te.get()); m_managedptr->AfterFailedCommit(%mevent); } catch (Apache::Geode::Client::GeodeException^ ex) { @@ -232,7 +232,7 @@ namespace apache void ManagedTransactionListenerGeneric::afterRollback(apache::geode::client::TransactionEventPtr& te) { try { - Apache::Geode::Client::TransactionEvent mevent(te.ptr()); + Apache::Geode::Client::TransactionEvent mevent(te.get()); m_managedptr->AfterRollback(%mevent); } catch (Apache::Geode::Client::GeodeException^ ex) { http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedTransactionWriter.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedTransactionWriter.cpp b/src/clicache/src/impl/ManagedTransactionWriter.cpp index f319667..bde9cbe 100644 --- a/src/clicache/src/impl/ManagedTransactionWriter.cpp +++ b/src/clicache/src/impl/ManagedTransactionWriter.cpp @@ -204,7 +204,7 @@ namespace apache void ManagedTransactionWriterGeneric::beforeCommit(apache::geode::client::TransactionEventPtr& te) { try { - Apache::Geode::Client::TransactionEvent mevent(te.ptr()); + Apache::Geode::Client::TransactionEvent mevent(te.get()); m_managedptr->BeforeCommit(%mevent); } catch (Apache::Geode::Client::GeodeException^ ex) { http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/ManagedVisitor.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/ManagedVisitor.cpp b/src/clicache/src/impl/ManagedVisitor.cpp index 101f11e..3ab01a1 100644 --- a/src/clicache/src/impl/ManagedVisitor.cpp +++ b/src/clicache/src/impl/ManagedVisitor.cpp @@ -34,8 +34,8 @@ namespace apache { using namespace Apache::Geode::Client; try { - ICacheableKey^ mg_key(SafeGenericUMKeyConvert<ICacheableKey^>(key.ptr())); - IGeodeSerializable^ mg_value(SafeUMSerializableConvertGeneric(value.ptr())); + ICacheableKey^ mg_key(SafeGenericUMKeyConvert<ICacheableKey^>(key.get())); + IGeodeSerializable^ mg_value(SafeUMSerializableConvertGeneric(value.get())); m_visitor->Invoke(mg_key, (Apache::Geode::Client::IGeodeSerializable^)mg_value); } http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/PdxHelper.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/PdxHelper.cpp b/src/clicache/src/impl/PdxHelper.cpp index 769710d..03929b2 100644 --- a/src/clicache/src/impl/PdxHelper.cpp +++ b/src/clicache/src/impl/PdxHelper.cpp @@ -45,7 +45,7 @@ namespace Apache CacheImpl* getCacheImpl() { CachePtr cache = CacheFactory::getAnyInstance(); - if (cache == NULLPTR) + if (cache == nullptr) { throw gcnew IllegalStateException("cache has not been created yet.");; } @@ -53,7 +53,7 @@ namespace Apache { throw gcnew IllegalStateException("cache has been closed. "); } - return CacheRegionHelper::getCacheImpl(cache.ptr()); + return CacheRegionHelper::getCacheImpl(cache.get()); } void PdxHelper::SerializePdx(DataOutput^ dataOutput, IPdxSerializable^ pdxObject) http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/PdxInstanceImpl.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/PdxInstanceImpl.cpp b/src/clicache/src/impl/PdxInstanceImpl.cpp index e4c181e..57027df 100755 --- a/src/clicache/src/impl/PdxInstanceImpl.cpp +++ b/src/clicache/src/impl/PdxInstanceImpl.cpp @@ -86,7 +86,7 @@ namespace Apache //dataInput->ResetPdx(0); CachePtr cache = CacheFactory::getAnyInstance(); - if (cache == NULLPTR) + if (cache == nullptr) { throw gcnew IllegalStateException("cache has not been created yet.");; } @@ -94,7 +94,7 @@ namespace Apache { throw gcnew IllegalStateException("cache has been closed. "); } - CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cache.ptr()); + CacheImpl* cacheImpl = CacheRegionHelper::getCacheImpl(cache.get()); if (cacheImpl != NULL) { Utils::updateStatOpTime(cacheImpl->m_cacheStats->getStat(), cacheImpl->m_cacheStats->getPdxInstanceDeserializationTimeId(), http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/PdxManagedCacheableKey.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/PdxManagedCacheableKey.cpp b/src/clicache/src/impl/PdxManagedCacheableKey.cpp index 646329e..003a3f4 100644 --- a/src/clicache/src/impl/PdxManagedCacheableKey.cpp +++ b/src/clicache/src/impl/PdxManagedCacheableKey.cpp @@ -153,7 +153,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } bool PdxManagedCacheableKey::operator ==(const apache::geode::client::CacheableKey& other) const @@ -180,7 +180,7 @@ namespace apache bool PdxManagedCacheableKey::operator ==(const PdxManagedCacheableKey& other) const { try { - return ((Apache::Geode::Client::IPdxSerializable^)m_managedptr)->Equals((other.ptr())); + return ((Apache::Geode::Client::IPdxSerializable^)m_managedptr)->Equals((other.get())); } catch (Apache::Geode::Client::GeodeException^ ex) { ex->ThrowNative(); @@ -295,7 +295,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } } // namespace client } // namespace geode http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/PdxManagedCacheableKeyBytes.cpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/PdxManagedCacheableKeyBytes.cpp b/src/clicache/src/impl/PdxManagedCacheableKeyBytes.cpp index 3f619e3..5cc34de 100644 --- a/src/clicache/src/impl/PdxManagedCacheableKeyBytes.cpp +++ b/src/clicache/src/impl/PdxManagedCacheableKeyBytes.cpp @@ -176,7 +176,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } bool PdxManagedCacheableKeyBytes::operator ==(const apache::geode::client::CacheableKey& other) const @@ -219,10 +219,10 @@ namespace apache Apache::Geode::Client::Serializable::GetTypeFactoryMethodGeneric(m_classId)(); obj->FromData(%mg_input);*/ Apache::Geode::Client::IPdxSerializable^ obj = getManagedObject(); - bool ret = obj->Equals(other.ptr()); + bool ret = obj->Equals(other.get()); // Apache::Geode::Client::Log::Debug("PdxManagedCacheableKeyBytes::equal return VAL = " + ret); return ret; - //return obj->Equals(other.ptr()); + //return obj->Equals(other.get()); } catch (Apache::Geode::Client::GeodeException^ ex) { ex->ThrowNative(); @@ -364,7 +364,7 @@ namespace apache catch (System::Exception^ ex) { Apache::Geode::Client::GeodeException::ThrowNative(ex); } - return NULLPTR; + return nullptr; } } // namespace client http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/PersistenceManagerProxy.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/PersistenceManagerProxy.hpp b/src/clicache/src/impl/PersistenceManagerProxy.hpp index 80a5452..fbbbb5e 100644 --- a/src/clicache/src/impl/PersistenceManagerProxy.hpp +++ b/src/clicache/src/impl/PersistenceManagerProxy.hpp @@ -64,8 +64,8 @@ namespace Apache virtual void init(const RegionPtr& region, PropertiesPtr& diskProperties) { - IRegion<TKey, TValue>^ gRegion = Region<TKey, TValue>::Create(region.ptr()); - Properties<String^, String^>^ gProps = Properties<String^, String^>::Create<String^, String^>(diskProperties.ptr()); + IRegion<TKey, TValue>^ gRegion = Region<TKey, TValue>::Create(region.get()); + Properties<String^, String^>^ gProps = Properties<String^, String^>::Create<String^, String^>(diskProperties.get()); m_persistenceManager->Init(gRegion, gProps); } http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/clicache/src/impl/SafeConvert.hpp ---------------------------------------------------------------------- diff --git a/src/clicache/src/impl/SafeConvert.hpp b/src/clicache/src/impl/SafeConvert.hpp index 007a8a7..8f8d091 100644 --- a/src/clicache/src/impl/SafeConvert.hpp +++ b/src/clicache/src/impl/SafeConvert.hpp @@ -394,7 +394,7 @@ namespace Apache inline static apache::geode::client::CacheableKey* SafeGenericMKeyConvert( TKey mg_obj ) { if (mg_obj == nullptr) return NULL; - apache::geode::client::CacheableKey* obj = Apache::Geode::Client::Serializable::GetUnmanagedValueGeneric<TKey>( mg_obj ).ptr(); + apache::geode::client::CacheableKey* obj = Apache::Geode::Client::Serializable::GetUnmanagedValueGeneric<TKey>( mg_obj ).get(); if (obj != nullptr) { return obj; http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/AttributesFactory.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/AttributesFactory.hpp b/src/cppcache/include/geode/AttributesFactory.hpp index 2775ea5..8ccb973 100644 --- a/src/cppcache/include/geode/AttributesFactory.hpp +++ b/src/cppcache/include/geode/AttributesFactory.hpp @@ -60,18 +60,18 @@ namespace client { * <h3>Attributes</h3> * <h4>Callbacks</h4> * <dl> - * <dt>{@link CacheLoader} [<em>default:</em> NULLPTR]</dt> + * <dt>{@link CacheLoader} [<em>default:</em> nullptr]</dt> * <dd>User-implemented plug-in for loading data on cache misses.<br> * {@link #setCacheLoader} {@link RegionAttributes#getCacheLoader} * {@link AttributesMutator#setCacheLoader}</dd> * - * <dt>{@link CacheWriter} [<em>default:</em> NULLPTR]</dt> + * <dt>{@link CacheWriter} [<em>default:</em> nullptr]</dt> * <dd>User-implemented plug-in for intercepting cache modifications, e.g. * for writing to an external data source.<br> * {@link #setCacheWriter} {@link RegionAttributes#getCacheWriter} * {@link AttributesMutator#setCacheWriter}</dd> * - * <dt>{@link CacheListener} [<em>default:</em> NULLPTR]</dt> + * <dt>{@link CacheListener} [<em>default:</em> nullptr]</dt> * <dd>User-implemented plug-in for receiving and handling cache related * events.<br> * {@link #setCacheListener} {@link RegionAttributes#getCacheListener} @@ -179,23 +179,23 @@ class CPPCACHE_EXPORT AttributesFactory : public SharedBase { // CALLBACKS /** Sets the cache loader for the next <code>RegionAttributes</code> created. - * @param cacheLoader the cache loader or NULLPTR if no loader + * @param cacheLoader the cache loader or nullptr if no loader */ void setCacheLoader(const CacheLoaderPtr& cacheLoader); /** Sets the cache writer for the next <code>RegionAttributes</code> created. - * @param cacheWriter the cache writer or NULLPTR if no cache writer + * @param cacheWriter the cache writer or nullptr if no cache writer */ void setCacheWriter(const CacheWriterPtr& cacheWriter); /** Sets the CacheListener for the next <code>RegionAttributes</code> created. - * @param aListener a user defined CacheListener, NULLPTR if no listener + * @param aListener a user defined CacheListener, nullptr if no listener */ void setCacheListener(const CacheListenerPtr& aListener); /** Sets the PartitionResolver for the next <code>RegionAttributes</code> * created. - * @param aResolver a user defined PartitionResolver, NULLPTR if no resolver + * @param aResolver a user defined PartitionResolver, nullptr if no resolver */ void setPartitionResolver(const PartitionResolverPtr& aResolver); @@ -265,15 +265,15 @@ class CPPCACHE_EXPORT AttributesFactory : public SharedBase { * this must be used to set the PersistenceManager. */ void setPersistenceManager(const char* libpath, const char* factoryFuncName, - const PropertiesPtr& config = NULLPTR); + const PropertiesPtr& config = nullptr); /** Sets the PersistenceManager for the next <code>RegionAttributes</code> * created. - * @param persistenceManager a user defined PersistenceManager, NULLPTR if no + * @param persistenceManager a user defined PersistenceManager, nullptr if no * resolver */ void setPersistenceManager(const PersistenceManagerPtr& persistenceManager, - const PropertiesPtr& config = NULLPTR); + const PropertiesPtr& config = nullptr); public: // DISTRIBUTION ATTRIBUTES @@ -369,7 +369,7 @@ class CPPCACHE_EXPORT AttributesFactory : public SharedBase { * @throws IllegalStateException if the current settings violate the * compatibility rules */ - RegionAttributesPtr createRegionAttributes(); + std::unique_ptr<RegionAttributes> createRegionAttributes(); private: RegionAttributes m_regionAttributes; http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/Cache.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/Cache.hpp b/src/cppcache/include/geode/Cache.hpp index e29c9f2..569c85a 100644 --- a/src/cppcache/include/geode/Cache.hpp +++ b/src/cppcache/include/geode/Cache.hpp @@ -42,6 +42,7 @@ namespace client { class CacheFactory; class CacheRegionHelper; class Pool; +class CacheImpl; /** * @class Cache Cache.hpp @@ -56,7 +57,8 @@ class Pool; * <p>A cache can have multiple root regions, each with a different name. * */ -class CPPCACHE_EXPORT Cache : public GeodeCache { +class CPPCACHE_EXPORT Cache : public GeodeCache, + public std::enable_shared_from_this<Cache> { /** * @brief public methods */ @@ -131,7 +133,7 @@ class CPPCACHE_EXPORT Cache : public GeodeCache { * Cache#createAuthenticatedView(PropertiesPtr). * * @param path the region's name, such as <code>AuthRegion</code>. - * @returns region, or NULLPTR if no such region exists. + * @returns region, or nullptr if no such region exists. */ virtual RegionPtr getRegion(const char* path); @@ -228,14 +230,12 @@ class CPPCACHE_EXPORT Cache : public GeodeCache { /** * @brief constructors */ - Cache(const char* name, DistributedSystemPtr sys, bool ignorePdxUnreadFields, - bool readPdxSerialized); Cache(const char* name, DistributedSystemPtr sys, const char* id_data, bool ignorePdxUnreadFields, bool readPdxSerialized); - CacheImpl* m_cacheImpl; + std::unique_ptr<CacheImpl> m_cacheImpl; protected: - Cache() { m_cacheImpl = NULL; } + Cache(); static bool isPoolInMultiuserMode(RegionPtr regionPtr); @@ -245,6 +245,8 @@ class CPPCACHE_EXPORT Cache : public GeodeCache { friend class FunctionService; friend class CacheXmlCreation; friend class RegionXmlCreation; + + FRIEND_STD_SHARED_PTR(Cache) }; } // namespace client } // namespace geode http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/CacheFactory.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/CacheFactory.hpp b/src/cppcache/include/geode/CacheFactory.hpp index c58cd73..5d519bb 100644 --- a/src/cppcache/include/geode/CacheFactory.hpp +++ b/src/cppcache/include/geode/CacheFactory.hpp @@ -45,7 +45,9 @@ class CppCacheLibrary; * For the default values for the pool attributes see {@link PoolFactory}. * To create additional {@link Pool}s see {@link PoolManager} */ -class CPPCACHE_EXPORT CacheFactory : public SharedBase { +class CPPCACHE_EXPORT CacheFactory + : public SharedBase, + public std::enable_shared_from_this<CacheFactory> { public: /** * To create the instance of {@link CacheFactory} @@ -53,7 +55,7 @@ class CPPCACHE_EXPORT CacheFactory : public SharedBase { * Properties which are applicable at client level. */ static CacheFactoryPtr createCacheFactory( - const PropertiesPtr& dsProps = NULLPTR); + const PropertiesPtr& dsProps = nullptr); /** * To create the instance of {@link Cache}. @@ -466,9 +468,9 @@ class CPPCACHE_EXPORT CacheFactory : public SharedBase { PoolFactoryPtr getPoolFactory(); - CachePtr create(const char* name, DistributedSystemPtr system = NULLPTR, + CachePtr create(const char* name, DistributedSystemPtr system = nullptr, const char* cacheXml = 0, - const CacheAttributesPtr& attrs = NULLPTR); + const CacheAttributesPtr& attrs = nullptr); static void create_(const char* name, DistributedSystemPtr& system, const char* id_data, CachePtr& cptr, @@ -477,8 +479,14 @@ class CPPCACHE_EXPORT CacheFactory : public SharedBase { // no instances allowed CacheFactory(); CacheFactory(const PropertiesPtr dsProps); + + public: + // TODO shared_ptr - this should be private, fix friend ~CacheFactory(); + private: + FRIEND_STD_SHARED_PTR(CacheFactory) + PoolPtr determineDefaultPool(CachePtr cachePtr); static CachePtr getAnyInstance(bool throwException); http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/CacheListener.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/CacheListener.hpp b/src/cppcache/include/geode/CacheListener.hpp index 14f7789..87ff012 100644 --- a/src/cppcache/include/geode/CacheListener.hpp +++ b/src/cppcache/include/geode/CacheListener.hpp @@ -87,7 +87,7 @@ class CPPCACHE_EXPORT CacheListener : public SharedBase { /** Handles the event of a new key being added to a region. The entry * did not previously exist in this region in the local cache (even with a - * NULLPTR value). + * nullptr value). * * @param event denotes the event object associated with the entry creation * This function does not throw any exception. @@ -101,7 +101,7 @@ class CPPCACHE_EXPORT CacheListener : public SharedBase { * entry * previously existed in this region in the local cache, but its previous * value - * may have been NULLPTR. + * may have been nullptr. * * @param event EntryEvent denotes the event object associated with updating * the entry http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/CacheLoader.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/CacheLoader.hpp b/src/cppcache/include/geode/CacheLoader.hpp index 71c9042..b205f79 100644 --- a/src/cppcache/include/geode/CacheLoader.hpp +++ b/src/cppcache/include/geode/CacheLoader.hpp @@ -44,7 +44,7 @@ namespace client { * Allows data to be loaded from a 3rd party data source and placed * into the region * When {@link Region::get} is called for a region - * entry that has a <code>NULLPTR</code> value, the + * entry that has a <code>nullptr</code> value, the * {@link CacheLoader::load} method of the * region's cache loader is invoked. The <code>load</code> method * creates the value for the desired key by performing an operation such @@ -62,8 +62,8 @@ class CPPCACHE_EXPORT CacheLoader : public SharedBase { * by the invocation of {@link Region::get} that triggered this load. * @param rp a Region Pointer for which this is called. * @param key the key for the cacheable - * @param helper any related user data, or NULLPTR - * @return the value supplied for this key, or NULLPTR if no value can be + * @param helper any related user data, or nullptr + * @return the value supplied for this key, or nullptr if no value can be * supplied. * *@see Region::get . http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/CacheWriter.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/CacheWriter.hpp b/src/cppcache/include/geode/CacheWriter.hpp index b520a34..457ef24 100644 --- a/src/cppcache/include/geode/CacheWriter.hpp +++ b/src/cppcache/include/geode/CacheWriter.hpp @@ -94,7 +94,7 @@ class CPPCACHE_EXPORT CacheWriter : public SharedBase { * <code>put</code> * or a <code>get</code> that causes the loader to update an existing entry. * The entry previously existed in the cache where the operation was - * initiated, although the old value may have been NULLPTR. The entry being + * initiated, although the old value may have been nullptr. The entry being * updated may or may not exist in the local cache where the CacheWriter is * installed. * http://git-wip-us.apache.org/repos/asf/geode-native/blob/c0098121/src/cppcache/include/geode/Cacheable.inl ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/Cacheable.inl b/src/cppcache/include/geode/Cacheable.inl index 4f7d61f..cfde539 100644 --- a/src/cppcache/include/geode/Cacheable.inl +++ b/src/cppcache/include/geode/Cacheable.inl @@ -39,7 +39,7 @@ inline CacheablePtr Cacheable::create( const PRIM value ) template <typename TVALUE> inline CacheablePtr createValue( const SharedPtr< TVALUE >& value ) { - return CacheablePtr( value ); + return std::dynamic_pointer_cast<Cacheable>(value); } template <typename TVALUE>