POV-Ray : Newsgroups : povray.off-topic : Quick C++ question... : Re: Quick C++ question... Server Time
4 Sep 2024 21:19:49 EDT (-0400)
  Re: Quick C++ question...  
From: clipka
Date: 11 Nov 2009 19:26:23
Message: <4afb562f@news.povray.org>
Here's another idea - a bit kludgey as well, but what the heck:

   struct MyIDirectFB;
   class dfbScreen
   {
       MyIDirectFB* dfb;
       ...
   };

and in your .cpp:

   struct MyIDirectFB
   {
     IDirectFB data;
   };

Requires a bit more effort in coding, but as I said: what the heck...

Or you might cheat a bit on the compiler, using something like:

   #ifndef _DIRECTFB_H__INCLUDED_
     // (or whatever symbol directfb uses in the header)
     struct IDirectFB;
   #end
   class dfbScreen
   {
       IDirectFB* dfb;
       ...
   };

and include <directfb> from your implementation instead of from your 
header file.

There's more than one way to skin a cat...


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.