StatisticProcess.hh
2.05 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
* StatisticProcess.hh
*
* Created on: Nov 05, 2014
* Author: AKKA
*/
#ifndef STATISTICPROCESS_HH_
#define STATISTICPROCESS_HH_
#include <vector>
#include <boost/shared_ptr.hpp>
#include <log4cxx/logger.h>
#include "AMDA_exception.hh"
#include "DataClient.hh"
#include "Parameter.hh"
#include "StatisticOperation.hh"
namespace AMDA {
namespace Parameters {
//class StatisticOperation;
/**
* @class StatisticProcess
* @brief A StatisticProcess is used to compute a statistic result in input data.
* @details This class implement AMDA::Parameters::DataClient interface
*/
class StatisticProcess : public AMDA::Parameters::DataClient {
public:
/**
*
* Default constructor.
*/
StatisticProcess(Parameter ¶meter, bool isCoverageIndependantOfResultType, int index = -1);
/**
* Default destructor.
*/
virtual ~StatisticProcess();
/**
* @overload DataClient::establishConnection
*/
virtual void establishConnection();
/**
* @brief initializes time attribute
*/
virtual TimeStamp init(TimeIntervalListSPtr pTimeIntervalList);
/*
* @brief Set arguments map
*/
void setArguments(std::map<std::string,std::string>& args);
/*
* @brief create statistic operation
*/
virtual void createOperation(void) = 0;
/*
* @brief get result dimension definition
*/
std::string getResultDimDefinition(bool forCoverage = false);
/**
* @brief compute statistic result and push it in a vector of string
*/
void compute(std::vector<std::string> &result, std::vector<std::string> &coverage);
/*
* @brief get UCD of the statistic process
*/
virtual std::string getUCD(void);
protected:
static log4cxx::LoggerPtr _logger;
Parameter& _parameter;
std::map<std::string,std::string> _args;
bool _isCoverageIndependantOfResultType;
int _index;
TimeIntervalListSPtr _timeIntervalList;
TimeIntervalList::iterator _currentTimeInterval;
StatisticOperationBase* _operation;
};
typedef boost::shared_ptr<StatisticProcess> StatisticProcessSPtr;
} /* namespace Parameters */
} /* namespace AMDA */
#endif /* STATISTICPROCESS_HH_ */