pingus-devel
[Top][All Lists]
Advanced

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

Re: [Pingus-CVS] CVS: Games/Pingus/src World.cc,1.76,1.77 World.hh,1.38,


From: Ingo Ruhnke
Subject: Re: [Pingus-CVS] CVS: Games/Pingus/src World.cc,1.76,1.77 World.hh,1.38,1.39
Date: 12 Jun 2002 14:42:26 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

address@hidden writes:

> Update of /usr/local/cvsroot/Games/Pingus/src
> In directory dark:/tmp/cvs-serv15835
> 
> Modified Files:
>       World.cc World.hh 
> Log Message:
> changed list<WorlObj*> to list<WorldObj*> * and moved the iterator typedef
> to the .cc - this should prevent a template instantiation through the .hh

In such a case it could probally make more sense to do something like
this:

### World.hh ###
class World
{
public:
        World ();
        ...
private:
        WorldImpl* impl;
};

### World.cc ###
World::World ()
        : impl (new WorldImpl)
{
}

### WorldImpl.hh ###
class WorldImpl
{
public:
        ...
private:
        ...
};

This way you could get rid of the whole privat part of the World class
at once, instead of forward declare and convert to a pointer every
small variable seperatly. Would also be a good point to clean up the
Worlds interface.

-- 
Advent:     http://www.freesoftware.fsf.org/advent/
Feuerkraft: http://www.freesoftware.fsf.org/feuerkraft/
Pingus:     http://pingus.seul.org/           || ICQ:      59461927
Home:       http://pingus.seul.org/~grumbel/  || JabberID: address@hidden



reply via email to

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