Behavioral ports are connected to their owning instance using the method connect[ClassName]. For example, to connect behavioral port p to its owner object a (of type A), use the following call:
a.getP()->connectA(a);
If the ports in previous API illustration are behavioral, you would use the following code:
for (int i=0; i<10; ++i) {
newSrc();
//hooks the class so it takes care of the messages
getSrcAt(i)->connectA(this);
}
For more efficiency, use the following code:
for (int i=0; i<10; ++i) {
newSrc()->connectA(this);