gzz-dev
[Top][All Lists]
Advanced

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

Re: [Gzz] PEG ``vob_colorable--humppake``: Abstract Colorable Vob


From: Asko Soukka
Subject: Re: [Gzz] PEG ``vob_colorable--humppake``: Abstract Colorable Vob
Date: Tue, 11 Mar 2003 10:28:02 +0200 (EET)

Mon, 10 Mar 2003, Tuomas Lukka wrote:
> >     class Colorable "interface"
> >         methods
> >         +Colorable cloneColored(List colors)
> >         +List getColors()
> 
> Now that it's immutable, I'm actually leaning slightly towards Color[] 
> colors...

Why is that? List would be easier to use, if colors are added one 
by one before sending the whole list to a vob. We currently use 
Color[] in BgVobs, but then we have a help function for adding 
colors:

    public boolean addColor(Color c) {
        if(solids == null || nsolids >= solids.length) {
            Color[] n= new Color[nsolids + 10];
            if(solids != null) System.arraycopy(solids, 0, n, 0, nsolids);
            solids = n;
        }
        solids[nsolids++] = c;
        return false;
    }

Altough, this leaves some null pointers to the end of the array :(

> > **Cell Views** and **Node Views** will be broken (and hast to be
> > fixed) after this change, since background vobs' addColor interface
> > will be removed to make vobs immutable.
> 
> Should explain the way they should store a prototype vob for each
> node type here.

Well, after saying that "cell views are broken", would be good to describe 
how to fix them :)

-- 
Asko Soukka <address@hidden>
<http://www.iki.fi/asko.soukka/>






reply via email to

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