Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.support.tarfile._ringbuffer Class Reference

List of all members.

Public Member Functions

def __init__
def find

Public Attributes

 idx

Detailed Description

Ringbuffer class which increases performance
   over a regular list.

Definition at line 2102 of file tarfile.py.


Constructor & Destructor Documentation

Definition at line 2106 of file tarfile.py.

02106 
02107     def __init__(self):
        self.idx = 0

Member Function Documentation

def MoinMoin.support.tarfile._ringbuffer.find (   self,
  offset 
)

Definition at line 2108 of file tarfile.py.

02108 
02109     def find(self, offset):
02110         idx = self.idx
02111         while True:
02112             item = self[idx]
02113             if offset in item:
02114                 break
02115             idx += 1
02116             if idx == len(self):
02117                 idx = 0
02118             if idx == self.idx:
02119                 # End of File
02120                 return None
02121         self.idx = idx
02122         return item
02123 
02124 #---------------------------------------------
02125 # zipfile compatible TarFile class
#---------------------------------------------

Here is the caller graph for this function:


Member Data Documentation

Definition at line 2107 of file tarfile.py.


The documentation for this class was generated from the following file: