summaryrefslogtreecommitdiffhomepage
path: root/opentrack-logic/tracklogger.cpp
blob: 5e4cf4f979395e008f8cf06fddc15d676d81ae02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "tracklogger.hpp"
#include "tracker.h"
 

void TrackLoggerCSV::write(const char *s)
{
    out << s;
}


void TrackLoggerCSV::write(const double *p, int n)
{
    if (!first_col)
        out.put(';');
    first_col = false;
    for (int i = 0; i < n-1; ++i)
    {
        out << p[i];
        out.put(';');
    }
    out << p[n-1];
}

void TrackLoggerCSV::next_line()
{
    out << std::endl;
    first_col = true;
}