Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}