From f4b191f0ea396b58465bfba40749977780a3af58 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 11 Feb 2009 05:29:41 +0000 Subject: Just removing some things that are cluttering up the source tree. --- src/old/ringlist.cpp | 106 --------------------------------------------------- 1 file changed, 106 deletions(-) delete mode 100644 src/old/ringlist.cpp (limited to 'src/old/ringlist.cpp') diff --git a/src/old/ringlist.cpp b/src/old/ringlist.cpp deleted file mode 100644 index 9efbbc4..0000000 --- a/src/old/ringlist.cpp +++ /dev/null @@ -1,106 +0,0 @@ -// -// C++ Implementation: ringlist -// -// Description: -// -// -// Author: Mike Buland , (C) 2005 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include - -#include "ringlist.h" - -RingList::RingList( int nInitSize ) - : List() -{ - nFirstIndex = 0; - nRealLength = nInitSize; - nDataLength = 0; - apData = new void*[nInitSize]; - pPushBuf = NULL; -} - -RingList::~RingList() -{ - delete[] apData; -} - -void *RingList::getAt( int nIndex ) -{ - if( nIndex < 0 || nIndex >= nDataLength ) - { - return NULL; - } - - return apData[(nFirstIndex+nIndex)%nRealLength]; -} - -void RingList::append( void *pData ) -{ - int nIndex = (nFirstIndex+nDataLength)%nRealLength; - - pPushBuf = apData[nIndex]; - apData[nIndex] = pData; - - if( nDataLength == nRealLength ) - { - nFirstIndex = (nFirstIndex+1)%nRealLength; - } - else - { - nDataLength++; - // We really didn't need it this time... - pPushBuf = NULL; - } -} - -void RingList::insertBefore( void *pData, int nPos ) -{ - // Not implemented right now, don't even try it! -} - -int RingList::getSize() -{ - return nDataLength; -} - -bool RingList::isEmpty() -{ - return nDataLength==0; -} - -void RingList::deleteAt( int nIndex ) -{ - // Also not implemented yet -} - -void RingList::empty() -{ - nFirstIndex = 0; - nDataLength = 0; -} - -void RingList::setSize( int nNewSize ) -{ - if( apData ) - { - delete[] apData; - } - nFirstIndex = 0; - nRealLength = nNewSize; - nDataLength = 0; - apData = new void*[nNewSize]; -} - -void RingList::setAt( int nIndex, void *pData ) -{ - apData[(nIndex+nFirstIndex)%nRealLength] = pData; -} - -void *RingList::getPushBuf() -{ - return pPushBuf; -} -- cgit v1.2.3