在一个程序包中为同一文件扩展名指定多个项目工厂是否有意义?我们希望为其具有相同的文件扩展名的几种项目类型,但尚不清楚它们是否会实施为 彼此的风味.我们正在使用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.
更多推荐
多个项目工厂具有相同的文件扩展名
发布评论