Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.datastruct.backends.LazyGroup Class Reference
Inheritance diagram for MoinMoin.datastruct.backends.LazyGroup:
Inheritance graph
[legend]
Collaboration diagram for MoinMoin.datastruct.backends.LazyGroup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __contains__
def __iter__

Public Attributes

 request
 name

Detailed Description

A lazy group does not store members internally, but gets them from
a backend when needed.

Lazy group is made only of members. It can not consist of other groups.

For instance, this is a possible LazyGroup:

 PossibleGroup
  * OneMember
  * OtherMember

This is a group which cannot be LazyGroup:

 NotPossibleGroup
  * OneMember
  * OtherMember
  * OtherGroup

Definition at line 114 of file __init__.py.


Constructor & Destructor Documentation

def MoinMoin.datastruct.backends.LazyGroup.__init__ (   self,
  request,
  name,
  backend 
)
Initialize a group.

@param request
@param name: moin group name
@backend: backend object which created this object

Reimplemented from MoinMoin.datastruct.backends.BaseGroup.

Definition at line 135 of file __init__.py.

00135 
00136     def __init__(self, request, name, backend):
00137         super(LazyGroup, self).__init__(request, name, backend)
00138 
00139         if name not in backend:
00140             raise GroupDoesNotExistError(name)


Member Function Documentation

def MoinMoin.datastruct.backends.LazyGroup.__contains__ (   self,
  member,
  processed_groups = None 
)

Reimplemented from MoinMoin.datastruct.backends.BaseGroup.

Definition at line 141 of file __init__.py.

00141 
00142     def __contains__(self, member, processed_groups=None):
00143         # processed_groups are not used here but other group classes
00144         # may expect this parameter.
00145         return self._backend._group_has_member(self.name, member)

def MoinMoin.datastruct.backends.LazyGroup.__iter__ (   self,
  yielded_members = None,
  processed_groups = None 
)

Reimplemented from MoinMoin.datastruct.backends.BaseGroup.

Definition at line 146 of file __init__.py.

00146 
00147     def __iter__(self, yielded_members=None, processed_groups=None):
00148         # processed_groups are not used here but other group classes
00149         # may expect this parameter.
00150         if yielded_members is None:
00151             yielded_members = set()
00152 
00153         for member in self._backend._iter_group_members(self.name):
00154             if member not in yielded_members:
00155                 yielded_members.add(member)
00156                 yield member
00157 


Member Data Documentation

Definition at line 39 of file __init__.py.

Definition at line 38 of file __init__.py.


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