给定源文件是否有 header "corresponding" 的技术名称?
Is there a technical name of the header "corresponding" to a given source file?
假设我有一个 header 文件 dummy.h
,以及相应的 dummy.cpp
或 dummy.c
。当我从第一个切换到第二个时,我可以说 "I switch from the header to its implementation"。但是我怎么能表达相反的意思呢? "Header's implementation" 听起来不错,但 "Implementation's header" 不是真的。
当我想表达一个实现文件应该首先包括... 它自己的 header 的概念时,我想到了这个问题。 (这实际上不是这个问题的主题,如果我明白怎么问的话,它很可能是一个未来的问题)。
我看到了几次 "corresponding header" 一词,但使用频率不高,无法确定它是否正确。
你有一个模块,由一个接口(header)和一个实现(C++ 文件)组成。
所以你可以说模块的接口或header,以及模块的实现或C++文件。
把它比作汽车的轮子和马达。你可以说汽车的轮子,汽车的马达,但不是(在最明显的意义上)马达的轮子,轮子的马达。
并且:这一切只对了一半,因为语言不是数学...
所以事实上对我来说,你提到的所有可能性都起到了作用:向我澄清你的意思。
似乎没有 official/technical 术语。鉴于评论,大家似乎一致认为 "corresponding header" 这个词已经足够清楚了。
为了完全明确,我可以表达我的概念:
An implementation file should first of all include the header file it is implementing.
(然后,这个概念可能是正确的也可能是错误的,但这是另一个故事:))
假设我有一个 header 文件 dummy.h
,以及相应的 dummy.cpp
或 dummy.c
。当我从第一个切换到第二个时,我可以说 "I switch from the header to its implementation"。但是我怎么能表达相反的意思呢? "Header's implementation" 听起来不错,但 "Implementation's header" 不是真的。
当我想表达一个实现文件应该首先包括... 它自己的 header 的概念时,我想到了这个问题。 (这实际上不是这个问题的主题,如果我明白怎么问的话,它很可能是一个未来的问题)。
我看到了几次 "corresponding header" 一词,但使用频率不高,无法确定它是否正确。
你有一个模块,由一个接口(header)和一个实现(C++ 文件)组成。
所以你可以说模块的接口或header,以及模块的实现或C++文件。
把它比作汽车的轮子和马达。你可以说汽车的轮子,汽车的马达,但不是(在最明显的意义上)马达的轮子,轮子的马达。
并且:这一切只对了一半,因为语言不是数学... 所以事实上对我来说,你提到的所有可能性都起到了作用:向我澄清你的意思。
似乎没有 official/technical 术语。鉴于评论,大家似乎一致认为 "corresponding header" 这个词已经足够清楚了。
为了完全明确,我可以表达我的概念:
An implementation file should first of all include the header file it is implementing.
(然后,这个概念可能是正确的也可能是错误的,但这是另一个故事:))