[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Adonthell-devel] Rewriting C++ base code
From: |
Alexandre Courbot |
Subject: |
Re: [Adonthell-devel] Rewriting C++ base code |
Date: |
Thu, 24 Jul 2003 11:32:47 +0200 |
User-agent: |
KMail/1.5 |
> I start to check to source code of the adonthell 0.4. version and i have
> made a small patch (cvs diff -u > adonthell-0.4.patch). I will continue
> to read and try to make others things than just rewriting code.
Great, thanks - I'll have a look at your patch today.
> Why is copy construction forbid in the surface class ?
Because surface is a virtual class. Starting with 0.4 we are using dynamic
backends for user interaction. Currently we only have a SDL backend
implemented but there is going to be others soon (like a QT or WxWindows
graphical backend for the editors). So the surface class itself isn't much
more than an empty shell of virtual functions that must be filled by the
backend class (that the game engine has of course no knowledge of to avoid a
dependancy with the backend's library). To create new surfaces we are using a
factory as you have probably noticed. So in this sense, copy construction
isn't relevant since construction of pure surface classes itself is forbid.
Unless it is possible to arrange that with some virtual tricks?
> Do we have to respect some coding style (like indentation) ?
4 spaces indentation, brackets at the same level as the enclosing block and
non-condensed code are the most important things. We had some coding rules
some time ago, but I don't know whether they are so important as long as the
points above are respected.
> should be :
> namespace gfx
> {
> surface::surface()
> {
> ...
> }
> }
> because using namespace gfx; does not say that the definitions belows
> will be part of the namespace gfx.
Right. Works with GCC but some compilers might complain.
More comments on your patch soon.
Alex.
--
http://www.gnurou.org
- [Adonthell-devel] Rewriting C++ base code, Pélisson Fabien, 2003/07/23
- Re: [Adonthell-devel] Rewriting C++ base code, Alexandre Courbot, 2003/07/23
- Re: [Adonthell-devel] Rewriting C++ base code, Pélisson Fabien, 2003/07/24
- Re: [Adonthell-devel] Rewriting C++ base code,
Alexandre Courbot <=
- Re: [Adonthell-devel] Rewriting C++ base code, Alexandre Courbot, 2003/07/24
- Re: [Adonthell-devel] Rewriting C++ base code, Pélisson Fabien, 2003/07/24
- Re: [Adonthell-devel] Rewriting C++ base code, Kai Sterker, 2003/07/24
- Re: [Adonthell-devel] Rewriting C++ base code, Alexandre Courbot, 2003/07/25
- Re: [Adonthell-devel] Rewriting C++ base code, Kai Sterker, 2003/07/25
- Re: [Adonthell-devel] Rewriting C++ base code, Pélisson Fabien, 2003/07/25
- Re: [Adonthell-devel] Rewriting C++ base code, Micah J. Cowan, 2003/07/25
- Re: [Adonthell-devel] Rewriting C++ base code, Alexandre Courbot, 2003/07/25
- Re: [Adonthell-devel] Rewriting C++ base code, Kai Sterker, 2003/07/25