c++ - 没有在 C++ 项目中的任何地方定义和使用它的前向声明类背后的目的是什么?
问题描述
我正在探索著名的OBS Studio源代码。那是在https://github.com/obsproject/libdshowcapture使用一个git 子模块
在文件source/capture-filter.hpp中有一个类的前向声明,该类在整个 repo 和整个 OBS-Studio repo 中都没有定义和使用。
namespace DShow {
// some other declaration
// this class is nowhere defined and used
class CaptureSource;
//some other declaration and definitions
}
我仔细检查但没有找到任何定义或CaptureSource
类的用法。如果我是对的,那么这种声明的目的是什么?
解决方案
推荐阅读
- node.js - 上传具有多个文件字段的多个图像
- javascript - 为什么我的获取顺序会改变程序的工作方式?
- c# - 从另一个包创建一个类的实例
- google-sheets - 跨工作表按字符串值查询、排序和选择行
- regex - Python3正则表达式问题(数据句柄)
- bufferedwriter - 为什么 BufferedWriter 不会将 URL 内容写入文本文件?
- android - 如何通过单击 EditText 中的文本来放置光标?(解决了)
- web-scraping - 总是通过scrapy获取状态429
- java - Gradle 任务 assembleDebug 失败,退出代码为 1 错误?
- java - 实现接口的 Java 链表。节点错误