By default, ports are created by value. However, if at design time you do not know how many ports there will be (multiplicity of *), you can create the ports programmatically.
For example, to instantiate 10 of the src ports, use the following call:
for (int i=0; i<10; ++1) {
// instantiate and add to the container of the owner
newSrc();
}