Blame view

src/Common/OutputFormatTime.hh 1.07 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/**
 * OutputFormatTime.hh
 *
 *  Created on: 26 oct. 2012
 *      Author: AKKA IS
 */

#ifndef OUTPUTFORMATTIME_HH_
#define OUTPUTFORMATTIME_HH_

#include <map>
#include <string>

namespace AMDA {

/**
 * Define output down load time format
 */
enum OutputFormatTime {
	FORMAT_OUTPUT_TIME_DD, ///< DD_server style
	FORMAT_OUTPUT_TIME_ISO, ///< ISO STYLE AAAA-MM-JJTHH:MM:ss.msd
	FORMAT_OUTPUT_TIME_DOUBLE, ///< in second;  stating from 1970
31dbec88   Benjamin Renard   date spaces ok
23
24
                    FORMAT_OUTPUT_TIME_SPACES, /// < YYYY MM DD hh mm ss
                    FORMAT_OUTPUT_TIME_MS, /// < Double with milliseconds 
fbe3c2bb   Benjamin Renard   First commit
25
26
27
28
29
};

static std::map<OutputFormatTime,std::string> ouputFormatTimeToStr = {
	{OutputFormatTime::FORMAT_OUTPUT_TIME_DD, "DD Time"},
	{OutputFormatTime::FORMAT_OUTPUT_TIME_ISO, "ISO 8601"},
31dbec88   Benjamin Renard   date spaces ok
30
31
32
	{OutputFormatTime::FORMAT_OUTPUT_TIME_DOUBLE, "Seconds from 1970"},
                    {OutputFormatTime::FORMAT_OUTPUT_TIME_SPACES, "YYYY MM DD hh mm ss"},
                    {OutputFormatTime::FORMAT_OUTPUT_TIME_MS, "Seconds from 1970, milliseconds"},
fbe3c2bb   Benjamin Renard   First commit
33
34
35
36
};

} /* namespace AMDA */
#endif /* OUTPUTFORMATTIME_HH_ */