前向声明的类背后的目的是什么,而无需在 C++ 项目中的任何地方定义和使用它?

问题描述

我正在探索著名的 OBS Studio代码。那是在
使用一个 git sub-module https://github.com/obsproject/libdshowcapture

文件 source/capture-filter.hpp 中有一个类的 forward declaration,该类没有在整个 repo 和整个 OBS-Studio repo 中定义和使用。

namespace DShow {

// some other declaration

// this class is Nowhere defined and used
class CaptureSource;

//some other declaration and deFinitions
}

我仔细检查过,但没有找到 CaptureSource 类的任何定义或用法。如果我是对的,那么这种声明的目的是什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)