예제 #1
0
// ----------------------------------------------------------------------------
void GrandPrixData::getReverse(std::vector<bool> *reverse) const
{
    reverse->clear();
    for(unsigned int i=0; i< m_tracks.size(); i++)
        if(isTrackAvailable(m_tracks[i]))
            reverse->push_back(m_reversed[i]);
}   // getReverse
예제 #2
0
// ----------------------------------------------------------------------------
void GrandPrixData::getLaps(std::vector<int> *laps) const
{
    laps->clear();
    for(unsigned int i=0; i< m_tracks.size(); i++)
        if(isTrackAvailable(m_tracks[i]))
            laps->push_back(m_laps[i]);
}   // getLaps
예제 #3
0
/** Returns the reverse setting for each available grand prix.
 *  \param include_locked If data for locked tracks should be included or not.
 *  \return A copy of alist with the reverse status for each track.
 */
std::vector<bool> GrandPrixData::getReverse(bool include_locked) const
{
    std::vector<bool> reverse;
    for (unsigned int i = 0; i< m_tracks.size(); i++)
        if(isTrackAvailable(m_tracks[i], include_locked))
            reverse.push_back(m_reversed[i]);

    return reverse;
}   // getReverse
예제 #4
0
/** Returns the laps for each available track of the grand prix.
 *  \param include_locked If data for locked tracks should be included or not.
 *  \return a std::vector containing the laps for each grand prix.
 */
std::vector<int> GrandPrixData::getLaps(bool include_locked) const
{
    std::vector<int> laps;
    for (unsigned int i = 0; i< m_tracks.size(); i++)
        if(isTrackAvailable(m_tracks[i], include_locked))
            laps.push_back(m_laps[i]);

    return laps;
}   // getLaps
예제 #5
0
/** Returns the list of tracks that is available (i.e. unlocked) of this
 *   grand prix.
 *  \param include_locked If data for locked tracks should be included or not.
 *  \return A copy of the list of available tracks in this grand prix.
 */
std::vector<std::string> GrandPrixData::getTrackNames(bool include_locked) const
{
    std::vector<std::string> names;
    for (unsigned int i = 0; i < m_tracks.size(); i++)
    {
        if(isTrackAvailable(m_tracks[i], include_locked))
            names.push_back(m_tracks[i]);
    }
    return names;
}   // getTrackNames
예제 #6
0
// ----------------------------------------------------------------------------
const std::vector<std::string>& GrandPrixData::getTrackNames() const
{
    m_really_available_tracks.clear();
    for(unsigned int i=0; i< m_tracks.size(); i++)
    {
        if(isTrackAvailable(m_tracks[i]))
            m_really_available_tracks.push_back(m_tracks[i]);
    }   // for i
    return m_really_available_tracks;
}   // getTrackNames