J
Jimmy N
Hello,
I recently discovered a flaw in the way the code generator handles shared
aggregation. Basically, say you have ClassA and ClassB joined by an
association where ClassA is the source and ClassB is the target. Now say that
the association is defined as such:
ClassA association end (Source):
Aggregation: shared
End Name: none
Multiplicity: 1
ClassB association end (Target):
Aggregation: none
End Name: m_ClassBObj
Multiplicity: *
Visibility: Private
Normally, if we want to translate this into code (i.e C#), we should
implement 2 classes where ClassA will contain a private member called
m_ClassBObj of type ClassB. However, Visio's code generator does not include
the private member; it only generates 2 empty classes eventhough we have a
shared aggregation with a specified target role name. The only way the code
generator would include the private member is if I changed the aggregation on
ClassA end from shared to composite.
Is this a bug?
Let me know if you need more explanation.
Thanks.
I recently discovered a flaw in the way the code generator handles shared
aggregation. Basically, say you have ClassA and ClassB joined by an
association where ClassA is the source and ClassB is the target. Now say that
the association is defined as such:
ClassA association end (Source):
Aggregation: shared
End Name: none
Multiplicity: 1
ClassB association end (Target):
Aggregation: none
End Name: m_ClassBObj
Multiplicity: *
Visibility: Private
Normally, if we want to translate this into code (i.e C#), we should
implement 2 classes where ClassA will contain a private member called
m_ClassBObj of type ClassB. However, Visio's code generator does not include
the private member; it only generates 2 empty classes eventhough we have a
shared aggregation with a specified target role name. The only way the code
generator would include the private member is if I changed the aggregation on
ClassA end from shared to composite.
Is this a bug?
Let me know if you need more explanation.
Thanks.