TiXmlElement * TcxActivity::getGpxTiXml() { TiXmlElement* trk = new TiXmlElement("trk"); TiXmlElement * gpxname = new TiXmlElement("name"); trk->LinkEndChild(gpxname); gpxname->LinkEndChild(new TiXmlText(this->id)); vector<TcxLap*>::iterator it; for ( it=lapList.begin() ; it < lapList.end(); it++ ) { TcxLap* lap = *it; trk->LinkEndChild( lap->getGpxTiXml() ); } return trk; }
TiXmlElement * TcxActivity::getGpxTiXml() { TiXmlElement* trk = new TiXmlElement("trk"); TiXmlElement * gpxname = new TiXmlElement("name"); trk->LinkEndChild(gpxname); gpxname->LinkEndChild(new TiXmlText(this->id)); vector<TcxLap*>::iterator it; TcxLap* previousLap=NULL; for ( it=lapList.begin() ; it < lapList.end(); ++it ) { TcxLap* lap = *it; lap->correctMissingStartTime(previousLap); trk->LinkEndChild( lap->getGpxTiXml() ); previousLap=lap; } return trk; }