[Next] [Up] [Previous]
Next: Cloning of Groups Up: Object Groups Previous: Non-intrusive Groups

Indexing of Groups

Both the GroupOf class as well as the CollectionOf class assign a unique group relative rank to each group member such that group members can be addressed by their rank.
GroupOf<FlockMember> group(...);

int kg;
for(int i=0; i < group.size(); i++)
    kg = group[i].invoke( m2f(&Sheep::feed, 18) );
Therefore we can easily access each group member individually.



CREDIT
This document is a part of the SCore cluster system software developed at Real World Computing Partnership, Japan. Copyright (c) 2000, 1999 Real World Computing Partnership.