thx for the input!
so lets say i have delcare my data like this:
std::vector<particle_c> particles_all;
is this the way to implement the datastream operator for a vector?
{
for (int i=0; i<particles_all.size(),i++)
{
out << particles_all[i].mass << particles_all[i].state_rel_sun.pos(0)
<< quint32(particles_all[i].mass_option); //and loads of other stuff
return out;
}
}
QDataStream &operator<<(QDataStream &out, const std::vector<particle_c> &particles_all)
{
for (int i=0; i<particles_all.size(),i++)
{
out << particles_all[i].mass << particles_all[i].state_rel_sun.pos(0)
<< quint32(particles_all[i].mass_option); //and loads of other stuff
return out;
}
}
To copy to clipboard, switch view to plain text mode
do i have to declare each vartype e.g. quint32(particles_all.mass_option) or is it enough if its a qt known type and its declared in a header e.g (in header of particle_c class: double mass; )
Bookmarks