views:

174

answers:

6

I've seen this done before in various C++ libraries - namely Qt (QtCore, QtGui, etc.) and Irrlicht (irrlicht.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?


Names given so far (with sources):

User contributions (no sources):

A: 

It's called an "include guard", and that's an official name.

Matt
He's not asking about the ifndef/define/endif, he's asking about one header that only includes a bunch of other headers.
Mark Ransom
I don't think the question is about the first two lines, but rather the fact that it is just a header file including other header files.
Matchu
Dang it, forgot to read the question title.
Matt
+3  A: 

I don't know if there's any official name, but the only one I've heard is "umbrella."

Chuck
+5  A: 

That's a nice question :)

I've found some sources that call it master header file, e.g:

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.

Lorenzo
Hmm, "master header", I like that. :P
Jake Petroules
@Lorenzo I'm accepting your answer as it was the first answer with sources provided.@Chuck Nothing against yours, but I think it's important to have sources on something like this. ;)
Jake Petroules
+2  A: 

convenience header

I have seen them referred to as convenience header files. Here is one example from boost that I pull up with a quick google search.


meta-header

Never actually heard/seen someone call it a meta-header but the idea fits and is much easier to say than umbrella or convenience. I even found a reference to that name with a google search.

caspin
Having only used Boost among the references given I think of it as "convenience header" too :)
Matthieu M.
A: 

I like "meta-header" (which I just this second invented :-)

LeonixSolutions
+1  A: 

how about

header header?

:)

Larry Watanabe