From: <ag...@us...> - 2012-01-23 18:18:22
|
Revision: 2681 http://zoolib.svn.sourceforge.net/zoolib/?rev=2681&view=rev Author: agreen Date: 2012-01-23 18:18:12 +0000 (Mon, 23 Jan 2012) Log Message: ----------- Method name change GetData-->GetPtr. It had become confusing to me that the type has Data in its name, and yet an element of that type was accessed using that same name. Not overly in love with Ptr, but it is accurate and distinct from the type name now. Modified Paths: -------------- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp trunk/zoolib/source/cxx/zoolib/ZData_Any.h trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp trunk/zoolib/source/cxx/zoolib/ZData_CF.h trunk/zoolib/source/cxx/zoolib/ZData_NS.h trunk/zoolib/source/cxx/zoolib/ZData_NS.mm trunk/zoolib/source/cxx/zoolib/ZNatter.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerryServer.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -379,7 +379,7 @@ ZBlackBerry::Data theMB = theQ.Get(); w.WriteBool(true); w.WriteCount(theMB.GetSize()); - w.Write(theMB.GetData(), theMB.GetSize()); + w.Write(theMB.GetPtr(), theMB.GetSize()); return; } } Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Client.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -235,7 +235,7 @@ if (r.ReadBool()) { Data theMB(r.ReadCount()); - r.Read(theMB.GetDataMutable(), theMB.GetSize()); + r.Read(theMB.GetPtrMutable(), theMB.GetSize()); return theMB; } } Modified: trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/blackberry/ZBlackBerry_Streamer.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -755,7 +755,7 @@ { Data theMB_PIN = this->GetAttribute(8, 4); if (theMB_PIN.GetSize() >= 15) - return ZByteSwap_ReadLittle32(static_cast<const char*>(theMB_PIN.GetData()) + 11); + return ZByteSwap_ReadLittle32(static_cast<const char*>(theMB_PIN.GetPtr()) + 11); return 0; } @@ -1062,7 +1062,7 @@ // We've already read one byte (containing the command); Data theMB(iPayloadSize - 1); - iStreamR.Read(theMB.GetDataMutable(), theMB.GetSize()); + iStreamR.Read(theMB.GetPtrMutable(), theMB.GetSize()); ZGuardRMtxR locker(fMutex); ZAssert(fGetAttribute); Modified: trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/dataspace/ZDataspace_Source_DatonSet.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -69,7 +69,7 @@ static const ZStrimW& operator<<(const ZStrimW& w, const Daton& iDaton) { const ZData_Any& theData = iDaton.GetData(); - w.Write(static_cast<const UTF8*>(theData.GetData()), theData.GetSize()); + w.Write(static_cast<const UTF8*>(theData.GetPtr()), theData.GetSize()); return w; } Modified: trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -120,7 +120,7 @@ { return sAsVal(ZStreamRPos_Memory(iSource, iSize)); } ZQ<ZVal_Any> sAsVal(const ZData_Any& iData) - { return sAsVal(iData.GetData(), iData.GetSize()); } + { return sAsVal(iData.GetPtr(), iData.GetSize()); } } // namespace QuickTime } // namespace FileFormat Modified: trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/fileformat/ZFileFormat_QuickTime_Val.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -41,7 +41,6 @@ ZQ<ZVal_Any> sAsVal(const ZData_Any& iData); ZQ<ZVal_Any> sAsVal(const ZStreamR& iStreamR); - } // namespace QuickTime } // namespace FileFormat } // namespace ZooLib Modified: trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/netscape/ZNetscape_Host_Std.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -650,7 +650,7 @@ fNPStream.lastmodified = 0; fNPStream.notifyData = iNotifyData; fNPStream.headers = nullptr; -// fNPStream.headers = static_cast<const char*>(fHeaders.GetData()); +// fNPStream.headers = static_cast<const char*>(fHeaders.GetPtr()); } Host_Std::Sender::~Sender() Modified: trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp =================================================================== --- trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/more/zoolib/photoshop/ZPhotoshop_Val.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -151,9 +151,9 @@ { \ Data theVal(theLength); \ if (0 == theLength \ - || noErr == SUITE->GetData(iSource, iKey, theVal.GetDataMutable())) \ + || noErr == SUITE->GetData(iSource, iKey, theVal.GetPtrMutable())) \ { \ - SUITE->PutData(DEST, theVal.GetSize(), theVal.GetDataMutable()); \ + SUITE->PutData(DEST, theVal.GetSize(), theVal.GetPtrMutable()); \ } \ } \ break; \ @@ -250,7 +250,7 @@ if (noErr == SUITE->GetDataLength(P0, P1, &theLength)) \ { \ Data result(theLength); \ - if (0 == theLength || noErr == SUITE->GetData(P0, P1, result.GetDataMutable())) \ + if (0 == theLength || noErr == SUITE->GetData(P0, P1, result.GetPtrMutable())) \ return result; \ } \ break; \ @@ -287,7 +287,7 @@ else if (const FileRef* theVal = iVal.PGet<FileRef>()) \ { SUITE->PutAlias(PARAM, theVal->Get()); } \ else if (const Data* theVal = iVal.PGet<Data>()) \ - { SUITE->PutData(PARAM, theVal->GetSize(), const_cast<void*>(theVal->GetData())); } + { SUITE->PutData(PARAM, theVal->GetSize(), const_cast<void*>(theVal->GetPtr())); } // ================================================================================================= // MARK: - ZPhotoshop suites, for local use Modified: trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp =================================================================== --- trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/old/zoolib/ZVal_ZooLib.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -1246,7 +1246,7 @@ const ZData_ZooLib* theMemoryBlock = sFetch_T<ZData_ZooLib>(fType.fBytes); iStreamW.WriteCount(theMemoryBlock->GetSize()); if (theMemoryBlock->GetSize()) - iStreamW.Write(theMemoryBlock->GetData(), theMemoryBlock->GetSize()); + iStreamW.Write(theMemoryBlock->GetPtr(), theMemoryBlock->GetSize()); break; } case eZType_Vector: @@ -1712,7 +1712,7 @@ { try { - iStreamR.Read(theRaw->GetDataMutable(), size); + iStreamR.Read(theRaw->GetPtrMutable(), size); } catch (...) { Modified: trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_Any.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -140,10 +140,10 @@ } } -const void* ZData_Any::GetData() const +const void* ZData_Any::GetPtr() const { return ZUtil_STL::sFirstOrNil(fRep->fVector); } -void* ZData_Any::GetDataMutable() +void* ZData_Any::GetPtrMutable() { this->pTouch(); return ZUtil_STL::sFirstOrNil(fRep->fVector); Modified: trunk/zoolib/source/cxx/zoolib/ZData_Any.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_Any.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_Any.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -53,8 +53,8 @@ size_t GetSize() const; void SetSize(size_t iSize); - const void* GetData() const; - void* GetDataMutable(); + const void* GetPtr() const; + void* GetPtrMutable(); void CopyFrom(size_t iOffset, const void* iSource, size_t iCount); void CopyFrom(const void* iSource, size_t iCount); Modified: trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_CF.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -127,14 +127,14 @@ ::CFDataSetLength(this->pTouch(), iSize); } -const void* ZData_CF::GetData() const +const void* ZData_CF::GetPtr() const { if (CFDataRef theData = this->pData()) return ::CFDataGetBytePtr(theData); return nullptr; } -void* ZData_CF::GetDataMutable() +void* ZData_CF::GetPtrMutable() { return ::CFDataGetMutableBytePtr(this->pTouch()); } void ZData_CF::CopyFrom(size_t iOffset, const void* iSource, size_t iCount) Modified: trunk/zoolib/source/cxx/zoolib/ZData_CF.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_CF.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_CF.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -66,8 +66,8 @@ size_t GetSize() const; void SetSize(size_t iSize); - const void* GetData() const; - void* GetDataMutable(); + const void* GetPtr() const; + void* GetPtrMutable(); void CopyFrom(size_t iOffset, const void* iSource, size_t iCount); void CopyFrom(const void* iSource, size_t iCount); Modified: trunk/zoolib/source/cxx/zoolib/ZData_NS.h =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_NS.h 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_NS.h 2012-01-23 18:18:12 UTC (rev 2681) @@ -68,8 +68,8 @@ size_t GetSize() const; void SetSize(size_t iSize); - const void* GetData() const; - void* GetDataMutable(); + const void* GetPtr() const; + void* GetPtrMutable(); void CopyFrom(size_t iOffset, const void* iSource, size_t iCount); void CopyFrom(const void* iSource, size_t iCount); Modified: trunk/zoolib/source/cxx/zoolib/ZData_NS.mm =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZData_NS.mm 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZData_NS.mm 2012-01-23 18:18:12 UTC (rev 2681) @@ -123,14 +123,14 @@ [this->pTouch() setLength:iSize]; } -const void* ZData_NS::GetData() const +const void* ZData_NS::GetPtr() const { if (NSData* theData = this->pData()) return [theData bytes]; return nullptr; } -void* ZData_NS::GetDataMutable() +void* ZData_NS::GetPtrMutable() { return [this->pTouch() mutableBytes]; } void ZData_NS::CopyFrom(size_t iOffset, const void* iSource, size_t iCount) Modified: trunk/zoolib/source/cxx/zoolib/ZNatter.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZNatter.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZNatter.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -160,7 +160,7 @@ w.WriteUInt8(2); w.WriteInt64(iExchange->fID ^ 1); w.WriteCount(iData.GetSize()); - w.Write(iData.GetData(), iData.GetSize()); + w.Write(iData.GetPtr(), iData.GetSize()); w.Flush(); } catch (...) Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_CF.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -329,7 +329,7 @@ else if (const ZData_Any* theValue = iVal.PGet<ZData_Any>()) { if (size_t theSize = theValue->GetSize()) - return sData(theValue->GetData(), theSize); + return sData(theValue->GetPtr(), theSize); else return sData(); } Modified: trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZUtil_NS.mm 2012-01-23 18:18:12 UTC (rev 2681) @@ -170,7 +170,7 @@ else if (const ZData_Any* theValue = iVal.PGet<ZData_Any>()) { if (size_t theSize = theValue->GetSize()) - return sData(theValue->GetData(), theSize); + return sData(theValue->GetPtr(), theSize); else return sData(); } Modified: trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp =================================================================== --- trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp 2012-01-19 22:37:47 UTC (rev 2680) +++ trunk/zoolib/source/cxx/zoolib/ZYad_AppleEvent.cpp 2012-01-23 18:18:12 UTC (rev 2681) @@ -38,7 +38,7 @@ const size_t theSize = ::AEGetDescDataSize(&iAEDesc); ZData_Any theData(theSize); - ::AEGetDescData(&iAEDesc, theData.GetDataMutable(), theSize); + ::AEGetDescData(&iAEDesc, theData.GetPtrMutable(), theSize); theMap.Set("Value", theData); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |