Back to index

plone3  3.1.7
Public Member Functions | Private Attributes
AdvancedQuery.sorting._SortAccess Class Reference

List of all members.

Public Member Functions

def __init__
def __getitem__
def __len__

Private Attributes

 _index
 _len
 _iter

Detailed Description

auxiliary wrapper class (to provide '__getattr__' and '__len__').

Definition at line 27 of file sorting.py.


Constructor & Destructor Documentation

def AdvancedQuery.sorting._SortAccess.__init__ (   self,
  len,
  generator 
)

Definition at line 29 of file sorting.py.

00029 
00030   def __init__(self, len, generator):
00031     self._index = 0
00032     self._len = len
00033     self._iter = generator

Here is the caller graph for this function:


Member Function Documentation

def AdvancedQuery.sorting._SortAccess.__getitem__ (   self,
  index 
)

Definition at line 34 of file sorting.py.

00034 
00035   def __getitem__(self,index):
00036     if index >= self._len: raise IndexError
00037     if index != self._index:
00038       raise SystemError('unconsequtive access')
00039     self._index += 1
00040     s = self._iter.next()
00041     if isinstance(s, tuple):
00042       # with sort values
00043       sv, did = s
00044       s = None, sv, did
00045     return s

Here is the caller graph for this function:

Definition at line 46 of file sorting.py.

00046 
00047   def __len__(self): return self._len
00048 


Member Data Documentation

Definition at line 30 of file sorting.py.

Definition at line 32 of file sorting.py.

Definition at line 31 of file sorting.py.


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