[Kst] empty vector
George Staikos
staikos at kde.org
Sat May 24 02:03:08 CEST 2003
On Friday 23 May 2003 18:53, Barth Netterfield wrote:
> It depends:
> If we want all inputs to be able to use the empty vector, and we want to be
> able to access the empty vector's scalars, etc, then yes, and it should be
> in the main vector list.
>
> But I don't think this is what we want. What we want is for a very few
> special cases (curves with error bars, and optional fields in plugins) we
> want to be able to acess an 'empty vector', but it should not be in the
> main vector list, because usually it is not a useful option.
Ok this of course is the question. The code is much simpler (very much
simpler I think) if the vector is in the main list, but it's only useful if
we want that vector to be available everywhere.
> I suggest that checking for none in the few cases we need to is much
> cleaner and easier to deal with (does not propogate weirdness around)....
Ok, and I think it would be a good idea to make a static vector in some
location (perhaps kstdoc) that we can point to as the empty vector then. We
can inherit from vector and create a new vector that never changes and is
safe to use by all dataobjects.
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list