pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System file reorganisation


From: David Philippi
Subject: Re: System file reorganisation
Date: Sun, 27 Oct 2002 13:36:39 +0100
User-agent: KMail/1.4.1

On Sunday 27 October 2002 12:22, Neil Hotmail wrote:
> Have one foo.hxx file with the interface, and good comments as to the
> purpose of each of the interface.

So far so good...

> Have one foo.cxx file which implements methods that call system specific
> things in foo, but which may be reimplemented as system specific

That's a bit unclear to me.

> Have one foo_<system>.cxx for each system it is ported to, with the
> implementation of the remaining methods.

Having only foo_<system>.cxx would be clear. ;-)
This way works too if you generate correct linking for every case. It starts 
to get worse when there are different targets that differ only slightly. I 
could imagine that I'd have e.g.:
System <-- SystemLinux <-- SystemFreeBSD as a class hierachie for Strategy if 
FreeBSD is very similar to Linux and needs only a slightly different 
approach. Doing this with differnt files requires to duplicate all the code 
instead of simply overloading one or two virtual functions.

Bye David





reply via email to

[Prev in Thread] Current Thread [Next in Thread]