Blame view

src/ParamOutputImpl/Plot/Epoch/EpochAxisDecorator.hh 1.08 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
 * EpochAxisDecorator.hh
 *
 *  Created on: Jan 16, 2015
 *      Author: AKKA
 */

#ifndef EPOCHAXISDECORATOR_HH_
#define EPOCHAXISDECORATOR_HH_

#include <boost/smart_ptr/shared_ptr.hpp>
#include <iosfwd>

#include "plplot/plplot.h"

#include "plplot/plstream.h"

#include "DefaultTimeAxisDecorator.hh"


namespace plot {

/**
 * @brief A simple decorator that display epoch time.
 */
class EpochAxisDecorator: public DefaultTimeAxisDecorator {
public:
	EpochAxisDecorator() : DefaultTimeAxisDecorator() {
	}
	EpochAxisDecorator(const EpochAxisDecorator& ref_ ) : DefaultTimeAxisDecorator(ref_){
	}
	EpochAxisDecorator& operator=(const EpochAxisDecorator& /*ref_*/) {
		return *this;
	}
	virtual ~EpochAxisDecorator(){
	}

protected:
	/**
	 * @overload DefaultTimeAxisDecorator::installLabelGenerator
	 */
	void installLabelGenerator(PanelPlotOutput* pplot_, TimeAxis* axis_);
};

/**
 * @brief Custom generator for epoch time label
 */
void generateEpochTimeLabel(PLINT axis, PLFLT value, char *label, PLINT length,
		PLPointer data);

} /* namespace plot */

#endif /* DEFAULEPOCHAXISDECORATOR_HH_ */