I have a class that is only used in one specific part of another class. It is not mentioned in any other parts of the main class. And I include the corresponding header at the top of a file.
Is there any way to "uninclude" the header after I've used it?
What I mean, is that after you "uninclude" the header with the class, references to the class would not be defined, and any calls to the class would throw an error when compiling.
Pseudo-code:
// code section where "cubeData" should be visible
#include "CubeData.h"
void mainWidget::createGeoObjects() {
cube = new cubeData();
// ...
}
// #uninclude "CubeData.h" - ???
//
// code section where "cubeData" should be invisible
void mainWidget::otherFunction() {
cube = new cubeData(); // should result in a compile error
// ...
}