I don't see how #include "all_headers.h" could be called a guide, as it doesn't provide any useful information as to what uses what.
I haven't used master includes but they still wouldn't solve the issue of circular dependencies and the need for forward declarations? If that is so, I can't see why including all should be less complex than including only what you need. (Or do you also rely on the order of inclusion - now that would be complicated.)
Cannot find classes / source files
I always liked the idea of putting it all in one place. Encapsulation, right?
Actually, the biggest problem with master headers is circular dependencies. A lot of times, a class will need "all_headers.h" in it's header, and at the same time you want that class's header in "all_headers.h"! Not to mention, it puts headers in files that don't need them, further decreasing encapsulation.
I suppose it would work to put certain headers, like standard library headers, and a couple others that depend on nothing and that everything else depends on, maybe exception classes.
Actually, the biggest problem with master headers is circular dependencies. A lot of times, a class will need "all_headers.h" in it's header, and at the same time you want that class's header in "all_headers.h"! Not to mention, it puts headers in files that don't need them, further decreasing encapsulation.
I suppose it would work to put certain headers, like standard library headers, and a couple others that depend on nothing and that everything else depends on, maybe exception classes.
Quote:Original post by rip-off
Can you give me your definition of encapsulation? I don't think it matches mine... [smile]
Shoot, what'd I say???
Encapsulation refers roughly to the property of a module of being independent of other modules, and especially being independent of their guts. That's not a particularly well-worded definition, though. What's yours?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement