[Kst] Extending DataVector::DataInfo?

Peter Kümmel syntheticpp at gmx.net
Wed May 22 06:46:10 UTC 2013

On 20.05.2013 23:03, Nicolas Brisset wrote:
> Hi,
> Looking again at the patch proposed recently for netcdf vectors with "compression" where a scale and offset should be used, I realize that it needs to be rewritten so that we cache the required info instead of calling the datasource constantly to query the same information all the time.
> Instead of adding another QMap to hold that information, I thought that it may be more elegant to extend DataVector::DataInfo.
>      struct KSTCORE_EXPORT DataInfo
>      {
>        DataInfo();
>        DataInfo(int frameCount, int samplesPerFrame);
>        int frameCount;
>        int samplesPerFrame;
>      };
> Peter/Barth: what do you suggest? I'd need to store a bool (use scaling yes/no) and two doubles (scale factor and offset) for each vector.
> Thanks,
> Nicolas

Extending this struct is not performance critical, so I think it is no problem.


More information about the Kst mailing list