[Kstars-devel] Binary star data loading accomplished in Branch!

Akarsh Simha akarshsimha at gmail.com
Tue Jun 3 16:12:05 CEST 2008


> For the unnamed stars we *want* the pointer to be copied.  When we 
> construct the template unnamed StarObject, it has pointers to the 
> translation of "star".  All the unnamed stars should have these same 
> pointers.

Ok. So we do that only for unnamed stars. I'll look through the stack
of constructors we end up calling currently and find out if we need to
do anything before trying a direct memcpy().

> For the named stars, the init() routines I suggested previously should 
> take care of the name pointers.  In the email I sent called "The Key 
> Issue", I had given this pseudo-code:
> StarObject::loadData(StarData *d) {
>     double RA  = scale[0] * double(d->RA);
>     double Dec = scale[1] * double(d->Dec);
>     ...
> 
>     SkyPoint::init(RA, Dec); 
>     SkyObject::init( x, y, z, whatever);
>     update();
> }

Ok. I will need to look through that mail and start out preparations
for faster loading of unnamed stars.

> I believe the SkyObject::init(..) routine could deal with setting the 
> names.  There should probably be a named and an unnamed version of
> SkyObject::init() since the name pointers for the unnamed stars should
> have been taken care of by the memcpy().

That sounds feasible.

How about we inherit two classes, PlainStar and NamedStar from
StarObject and implement these init functions in them differently?

Regards
Akarsh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.kde.org/pipermail/kstars-devel/attachments/20080603/6172cf68/attachment.pgp 


More information about the Kstars-devel mailing list