I am kinda trying to implement a windowing library in C++, the circumstances are forcing me to implement it all myself, that's not the point of this question however.
My question is: What should be in a PIMPL class? What attributes, to be more accurate. For instance, as I stated yet, I am implementing an windowing library and I have 2 kind attributes:
- These, which describe the window (int Width, char* pTitle ect. )
- And those, which are needed by the operating system(HWND, HDC, HGLRC for windows or XEvent, Display, Window for Linux/X11).
My current approach is, that the implementation holds all attributes, the class above, that has the PIMPL, calls getter and setter methods of the implementation in order to retrieve its attributes.
What's the right approach? Put them all in one (PIMPL-) class or split them up?