Jean-Sebastien Delfino wrote:
Pete Robbins wrote:
I think we should revert that change I made then but it would be nice
to get
it to compile on windows ;-)
I'm still not happy with Composite constructor passing it's this
pointer to
it's parent ComponentType. Is this not wrong? Is it saying I am a
Composite
and I am contained in myself?? In this case is the ComponentType
contained
in the composite? I think not so instead of passing "this" to
ComponentType
constructor maybe "0" would be more appropriate?
Am I making sense?
Cheers,
Yes, you're making sense :)
Here's a few thoughts:
1) A composite is not contained in itself.
2) The SCA recursive composition, where: "composite A contains a
component B" and "component B is an instance of a composite C" does
not imply containment. In this example composite C is not contained in
B. C could be used to create components in other composites D, E, F. C
is probably packaged and installed separately from A.
3) On the other hand, somebody could also nest composite C inside
composite A, zip A into A.zip and have C inside A.zip... Then we could
probably ask the question of containment... As far as I know the SCA
spec does not address all the packaging scenarios yet and doesn't
cover that.
4) Now a troubling thought (at least it troubles me): A componentType
uses interfaces and types, which are normally packaged in the
composite containing the componentType. This is easy for
componentTypes describing simple implementations (a script, a C++
class etc.). Now a Composite is also a ComponentType, but it uses on
its services and references interfaces and types usually packaged
in... itself... Given that in most cases it'll need to share these
interfaces and types with other composites, there is probably
something wrong here, missing in the spec, and obviously missing in
our implementations...
In doubt, since all these composites are contained in an SCA system,
I'd suggest we pass the pointer to the SCA system composite for now.
And 0 as you propose will probably work as well :)
--
Jean-Sebastien
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]