[MERGE] Deprecate export-related InventoryEntry methods
Robert Collins
robertc at robertcollins.net
Mon Jul 28 07:18:03 BST 2008
On Mon, 2008-07-28 at 15:42 +1000, Martin Pool wrote:
>
> It seems like a case of double-dispatch based on both the entry kind
> and the destination format. This is much more closely coupled to the
> exporter than to the inventory kind, and it's probably more likely
> people will want to add new exporters, so it's probably happier there.
Our canned pattern for double dispatch is InterObject - in this case
probably
InterKindExporter
or some such.
but that said, I think every exporter will need to add logic for every
known kind, so perhaps a better double-dispatch pattern here is
Visitor::
ExporterClass.export_dir
ExporterClass.export_file
ExporterClass.export_link
ExporterClass.export_subtree
which are then called into from the generic logic.
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080728/cab19ec9/attachment.pgp
More information about the bazaar
mailing list