如何在 C++ 中模拟 C# typeof-command 行为?
C# 示例:
public static PluginNodeList GetPlugins (Type type)
{
...
}
称呼:
PluginManager.GetPlugins (typeof(IPlugin))
如何使用 C++ 实现这一点?也许 QT 或 Boost 库提供了解决方案?
如果您想以从文件(.so 或 .dll)加载这些类型的对象的方式实现 .GetPlugins(...),情况会怎样?