Package populus :: Module SocialPlace :: Class MultiQueue
[frames] | no frames]

Class MultiQueue


This is a queue that has multiple serving spots, one for each Prop that is passed in the targetList. For each target, a reference to the avatar / QueuingGroup currently occupying its serving spot is stored (or None). When an avatar desires to use one of the props, it will join the queue at the end. As soon as one of the serving spots becomes free, the first in line will advance to that.

Instance Methods
 
__init__(self, targetList, initiator, manager, parent=render)
 
enqueue(self, avatar)
See Queue.enqueue()
 
beingServed(self, avatar)
Same as Queue.beingServed() except it scans multiple serving spots.
 
advanceQueue(self, target)
Tells the first in line it can now advance to the given serving spot.
 
finishServingM(self, target)
Advances the queue, i.e.

Inherited from Queue: contains, finishServing, firstPosition, getIndex, removeQueue

Method Details

__init__(self, targetList, initiator, manager, parent=render)
(Constructor)

 
Overrides: Queue.__init__

enqueue(self, avatar)

 

See Queue.enqueue()

Overrides: Queue.enqueue

beingServed(self, avatar)

 

Same as Queue.beingServed() except it scans multiple serving spots.

Overrides: Queue.beingServed

finishServingM(self, target)

 

Advances the queue, i.e. causes the serving spot that has just become vacant to be occupied by the next in line, as long as there are more participants in the queue. If not, the queue is destroyed.