Say I have the following code in
Employee.h
namespace Company
{
class Employee {};
}
Manager.h
class Manager {};
When the user drags an inheritance line between Manager and Employee, we will generate the following code in Manager.h…
class Manager : Company::Employee {};
Your feedback on the following issues will be appreciated.
The following are some of the reasons that deter us from doing it ourselves
· Redundant #includes may introduce clutter, may cause compilation errors
· It will be difficult to find the correct path to Employee.h
· What if the user #includes everything in a precompiled header
· What if the #included header requires other #includes before it? Many headers do not embed #includes for dependent headers, instead relying on the .cpp to #include the dependent headers separately. We cannot figure out what is ‘right’ without a proper dependency graph.
· Yes what we generated won’t compile but at least we just did what the user requested. It is in a better state, than actually generating something more than what the user requested and that causing more compilation errors.
class Manager : Employee {};