[Divunal-author] Charge interfaces
Allen Short
washort@twistedmatrix.com
Sun, 11 May 2003 23:06:43 -0500 (CDT)
----Security_Multipart(Sun_May_11_23:06:43_2003_975)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
>>>>> "Christopher" == Christopher Armstrong <radix@twistedmatrix.com> writes:
> The only alternative I have come up with is rather lame: There
> will only be IChargeSource and IChargeSink interfaces, and
> they'll both define a `getShape' method (or maybe getSinkShape
> and getSourceShape, because some objects will probably want to
> implement both source and sink in the same class). Each
> implementation of these interfaces will check to make sure that
> the opposite is a compatible shape, which could just be a
> string. I actually partially implemented this, but it smelled
> bad so I threw it out. But now that I've run into the problem
> with the `connect' action, it seems to be the only way to do it.
Hmm. I didn't smell it, but from here that doesn't sound so bad. That
way you keep your "charge source/sink compatibility" issues neatly
tucked into a couple components and dont have to fight with the
components system to get stuff like multiple sources/sinks working.
----Security_Multipart(Sun_May_11_23:06:43_2003_975)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQA+vx3WEd6n5DRBYM4RAhiSAJ9ke52DDb4F4ccQa4YQlirNr18iwwCfS7c2
f9For2Dpwb6xRvh/AQ3BMgM=
=GC3z
-----END PGP SIGNATURE-----
----Security_Multipart(Sun_May_11_23:06:43_2003_975)----