Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Windows crap, no pimpl
- class MyThing
- {
- HMODULE this_thing;
- HICON that_thing;
- public:
- DoCrap();
- };
- // Unix crap no pimpl
- class MyThing
- {
- FILE this_thing;
- void* that_thing;
- public:
- DoCrap();
- };
- // PIMPL:
- class MyThing
- {
- struct MyThingImplementation;
- MyThingImplementation* m_Pimpl;
- public:
- DoCrap();
- };
- // now you have different CPP files for win/nix, which is ok. m_Pimpl size is same across platforms sizeof(pointer type), pretty much always 4 bytes.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement