多个项目工厂具有相同的文件扩展名

编程入门 行业动态 更新时间:2024-10-26 00:25:02
本文介绍了多个项目工厂具有相同的文件扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

更多推荐

多个项目工厂具有相同的文件扩展名

本文发布于:2023-11-02 17:53:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1553030.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   文件扩展名   工厂   项目

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!