多个项目工厂具有相同的文件扩展名 [英] Multiple Project Factories for same file extension

查看:91
本文介绍了多个项目工厂具有相同的文件扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个程序包中为同一文件扩展名指定多个项目工厂是否有意义?我们希望为其具有相同的文件扩展名的几种项目类型,但尚不清楚它们是否会实施为 彼此的风味.我们正在使用MPF.一点点实验似乎表明,实际上并没有优先"的概念.在没有风味的情况下打开我们类型的项目文件时.所以,这让我想到了正确的方法 这里的设计是一个工厂,它使用模板(或项目文件)中的信息来选择要实例化哪个ProjectNode派生的类(实际上,如果我们需要多个ProjectNode派生的类).

Does it ever make sense to specify multiple project factories for the same file extension within a package?  We have several project types for which we want to have the same file extension, though it's not clear if they will be  implemented as flavors of one another.  We're using MPF.  A little bit of experimentation seems to indicate there's not really a notion of "priority" when opening a project file of our type in the absence of flavors.  So, it has me thinking the proper design here is a single factory that uses info from the template (or project file) to choose which ProjectNode-derived class to instantiate (if, in fact, we need more than one ProjectNode-derived class).

任何建议都将不胜感激.

Any advice is much appreciated.

推荐答案

We're doing research on this issue. It might take some time before we get back to you.


这篇关于多个项目工厂具有相同的文件扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆