To-many relations are implemented by collections of pointers using the OMCollection template.
If E is a class name multiply related to F by role name role, E contains the following data member:
OMCollection<F*> role;
The following methods are generated in E to manipulate this relation:
OMIterator<F*> getRole() const;
For example, if you want to send event X to each of the related F objects, use the following code:
OMIterator<F*> iter(anE->getRole());
while(*iter)
{
*iter->GEN();
iter++;
}
In this code, anE is an instance of E.
void addRole(F* p_F);
void removeRole(F* p_F);
void clearRole();
These defaults are modifiable through the properties of the role.