本文介绍了插件架构C / C ++应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要知道如何开始编写基于插件架构的应用程序。我的意思是如何写一个基地code和让其他人加入他们写插件开发的应用程序。
我知道,有在C ++这样一些问题。大多数人使用其他语言如Python的插件添加到自己的C ++应用程序。

I need to know how to start writing an application based on plug-in architecture. I mean how to write a base code and let others develop the application by adding the plug-ins they write.I know that there is some problems in doing so in c++. most people use another language such as python to add plug-ins to their c++ application.

推荐答案

我想,这是不是您所期望的答案,但你可以尝试检查的来源。它是用C ++编写(有些地方可以做的更好,我的脑海里,但总体来说是好的),整个应用程序完成的方式,以便它只是处理插件。

I think, this is not the answer you expect, but you could try to examine the Rainmeter sources. It's written in C++ (some places could be done better, to my mind, but overall it's ok) and the whole application is done the way so it just handles plugins.

即使是简单的API是通过插件完成的,也有一堆插件贡献的例子,我的意思是,别人写的(我这样做太,一天)。

Even the simple API is done via plugins, there is also a bunch of examples of contributed plugins, I mean, written by someone else (I did that too, one day).

我觉得你实际上可以通过查看其他应用研究了很多的基于插件的开发新花样。

I think you could actually study a lot of new tricks in the plugin-based development by looking at other applications.

另外提一下,另一个很好的样本是。

Also to mention, another good sample is Miranda IM.

编辑:另外,如果我涵同样的任务,我实际上将增加一些蟒蛇(或类似的东西)的后端我的应用程序并用它作为语言的SDK(例如,使用的boost ::蟒蛇)。

Also, if I han the same task, I would actually add some python (or something like that) backend to my application and use it as the language for SDK (for example, using boost::python).

这篇关于插件架构C / C ++应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 20:46