|
|
Warp <war### [at] tagpovrayorg> wrote:
> (A very ugly solution would be to use void pointers, and then reinterpret
> cast them as needed. But if you are determined to not to have to #include
> that header, then that's something that would work.)
I thought of another uglyish kludge that might work and, while kludgey,
not necessarily as ugly as the void pointers:
// Header:
class dfbScreen
{
class MyIDirectFB
MyIDirectFB* dfb;
...
};
// Source file:
class dfbScreen::MyIDirectFB: public IDirectFB
{
/* If IDirectFB supports copying, you can just implement a constructor
here which takes an instance of type IDirectFB in order to initialize
objects of type MyIDirectFB, like:
MyIDirectFB(const IDirectFB& init): IDIrectFB(init) {}
If IDirectFB does not support copying, then you'll have to replicate
its constructors here. No way of automatizing that until the next C++
standard gets implemented in compilers.
*/
};
--
- Warp
Post a reply to this message
|
|