代码之家  ›  专栏  ›  技术社区  ›  Jake Petroules

What do you call a single header whose purpose is to include other header files?

  •  14
  • Jake Petroules  · 技术社区  · 15 年前

    我以前在各种C++库中看到过这一点,即QT(QtCube,QtGui等)和Irrlicht(RiRiH.H):

    // file - mylibrary.h
    
    #include "someclass1.h"
    #include "someclass2.h"
    #include "someclass3.h"
    // and so on...
    

    Obviously this exists for convenience - a programmer wishing to use the library only has to include one header instead of lots of different ones. My question is, is there a special name for this type of header file? Even if there's not an "official" name, what you you refer to it as? A "convenience header" or "module header" or something?


    迄今为止给出的名称( 随着来源 ):

    User contributions ( 无来源 ):

    5 回复  |  直到 15 年前
        1
  •  6
  •   lornova    15 年前

    That's a nice question :)

    I've found some sources that call it master header file ,例如:

    When it is used to host headers for the header precompiler, it could be called precompiler global header :

    However I don't think that there's a single widespread way to call it.

        2
  •  3
  •   Chuck    15 年前

    我不知道是否有官方的名字,但我听说的唯一一个是“雨伞”。

        3
  •  2
  •   deft_code    15 年前

    convenience header

    我看到他们称为方便头文件。 Here is one example from boost that I pull up with a quick google search.


    元报头

    从未听过或见过有人称之为元标题,但这个想法很适合,而且比 雨伞 方便 . 我甚至找到了一个 reference to that name with a google search.

        4
  •  2
  •   Larry Watanabe    15 年前

    怎么样

    头标题?

    :)

        5
  •  0
  •   Mawg says reinstate Monica    15 年前