Remember the UML diagram at the beginning of this chapter? The SysInfoWindowsImpl class is one of the classes derived from the SysInfo class. The main purpose of this class is to encapsulate the Windows-specific code to retrieve CPU and memory usage.
It's time to create the SysInfoWindowsImpl class. To do that, you need to perform the following steps:
- Right click on the ch02-sysinfo project name in the hierarchy view
- Click on Add New | C++ Class | Choose
- Set the Class name field to SysInfoWindowsImpl
- Set the Base class field to <Custom> and write under the SysInfo class
- Click on Next then Finish to generate an empty C++ class
These generated files are a good starting point, but we must tune them:
#include ...