If I have object A (from Class A) which contains a method that takes a parameter of object B (instantiated from Class B, but owned by someone else), is this drawn as an aggregate? Obviously it's not composition, because object B is passed into Object A. The part is not destroyed with the whole -- I understand this.
What I'm seeing then is when EA generates (python) code for my class A, which uses object B, it assumes it needs to include the source for Class B. Is this simply because in C++, type declarations are required? This wreaks havoc on my code, because I end up with a circular reference between the two source files.
Practical example for clarification:
File 1 provides Class Wheel
File 2 provides Class Car
File 3 provides Wheel Factory
Class Car:
Constructor(Wheel)
Class Wheel:
Constructor(Tire)
Class WheelFactory:
Constructor()
FactoryMethod() {
return new Wheel
}
Program:
wheel = WheelFactory.FactoryMethod()
new_car = Car(wheel)
Since Program owns the wheel (composite if Program were an object), Car just accesses the passed object's methods and stuff. In Python, it doesn't need to know about the object unless it is going to create one.
So, is Wheel an aggregate of Car? Should the source file for Car import the Wheel source?
My situation is more complex, but in specifying an aggregate in my diagram, I end up with a circular reference via having to traverse the python library tree again (which triggers the __init__ files in a strange order), and therefore one of my source files won't compile.