Mail Archives: djgpp/1997/08/13/09:21:05
Paul Derbyshire writes:
>I notice that the fixeds in Allegro are replaced with a fix class in C++
>because of #ifdef _cpluspluses in the allegro.h file.
Not so much replaced as supplemented: you can still use "fixed"
variables in C++, the fix class just makes things a bit easier by
automating the conversions to and from integer and float types, and
allowing you to use the regular C mutliply and divide operators...
>I am curious if the same can be done for those GUI objects. They are an
>example of object oriented design in the absence of C++: they work but
>are ugly and cruftiferous compared to their (hypothetical for now) C++
>counterparts
See http://www.talula.demon.co.uk/allegro/degui.zip: Doug Eleveld has
alraedy done exactly this. He's written C++ wrappers for the existing
object types, plus come up with some very ingeneous ways of hooking the
existing C approach into a C++ environment, so you can mix and match the
best of both worlds...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -