[Next] [Up] [Previous]
Next: Indexing of Groups Up: Object Groups Previous: Mapping

Non-intrusive Groups

Group members do not necessarily need to know, that they are part of a group. In that case, TACO offers an even simpler method to create groups.

CollectionOf<Sheep> flock(...);
The CollectionOf class does not require its member type to be derived from the GroupMember class and thus we can create a group of Sheep directly without the need of an intermediate FlockMember class the declares its group membership. In this case, group membership is entirely orthogonal to the member type of the group, which potentially enhances reusability.

However, since many issues related to parallel and distributed computing require at least some group awareness, we recommend to use the CollectionOf class only in simple and straightforward cases. Otherwise a software design as sketched in the previous section should be strongly preferred, since it allows for both easy reusability as well as separation of concern, since the treatment of special cases related to group membership, parallelism and distribution do not interfere with the basic member type.