[merge] LazyFactory
Aaron Bentley
aaron.bentley at utoronto.ca
Tue Aug 15 20:13:01 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
>>Yeah, and all but transports need to be exposed as EnumOptions. So I'm
>>inclined towards One Registry Class To Rule Them All.
>
>
> Sure. I'll also be introducing version-info formats, and I would like to
> have Lazy Imported command definitions, etc.
So really, everything that needs to be registered needs to appear in the
help? I don't think it makes sense to define a generic Registry, then.
It makes more sense to define a SwitchRegistry and design it
specifically for that.
>>I was thinking a factory function is all I need. Is there are reason
>>for them to be classes?
>
>
> Nothing specific. It was more of a 'and the thing you really want'.
It seems plausible that you might want to instantiate the same class
with different arguments for some switches, so a factory (which can be a
class, of course) seems to make sense.
> Are you thinking a separate Registry object for each list of formats, or
> a single one?
I was thinking of one Registry for each list of formats.
> PS> A small thing, but technically transports should also be a
> OptionEnum, because it is used by 'cmd_selftest'. You can technically
> run the selftest with a custom transport as the default.
True. For some reason, I thought that was one of our wacky
pre-subcommand arguments.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFE4hy90F+nu1YWqI0RArKzAJ0cNu6qIT+kN2P2xTsqCE96N4nMDACeN/MO
SjgFSRyCLVd3X6XhlISzoTw=
=fwXZ
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list