void OGROCIStringBuf::Append( const char *pszNewText ) { int nNewLen = strlen(pszNewText); MakeRoomFor( nNewLen ); strcat( pszString+nLen, pszNewText ); nLen += nNewLen; }
CACHE_HANDLE ObjectCache::Add(CachedObject *pObj) { ERROR3IF(pObj==NULL, "Error: the object to cache can't be NULL"); if (pObj == NULL) return 0; // MYTRACE( _T("ObjectCache::Add()\n")); // if we can make room for the object then assign the object a unique handle and cache it if (MakeRoomFor(pObj)) { CACHE_HANDLE hObj = m_HandleFactory++; pObj->StoreHandle(hObj); // store the CachedObject Handle m_NumObjects++; // Increase the number of objects m_CurrentSize += pObj->GetSize(); // Increase the space used m_ObjectMap[hObj] = pObj; // set the object in the hash table return hObj; } return 0; }