58 lines
1.3 KiB
C++
58 lines
1.3 KiB
C++
/*
|
|
* File: VectorStatistic.h
|
|
* Author: jgaebler
|
|
*
|
|
* Created on June 21, 2011, 5:17 PM
|
|
*/
|
|
|
|
#ifndef VECTORSTATISTIC_H
|
|
#define VECTORSTATISTIC_H
|
|
|
|
#include "../common/Platform.h"
|
|
#include "../common/time/GenericTime.h"
|
|
|
|
#if OMNETPP
|
|
#include <coutvector.h>
|
|
#else
|
|
#pragma message("VectorStatisticRecorder not implemented for ubeeme yet")
|
|
#endif
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
/**
|
|
* @brief Provides an abstraction for storing statistic data within a vector
|
|
* @author Jan Gäbler
|
|
* @ingroup Moversight
|
|
* @class VectorStatistic
|
|
*/
|
|
#if OMNETPP
|
|
class VectorStatistic {
|
|
public:
|
|
#else
|
|
class VectorStatistic {
|
|
#pragma message ("class VectorStatistic not implemented yet")
|
|
#endif
|
|
VectorStatistic(const char * name);
|
|
~VectorStatistic();
|
|
|
|
virtual bool record(const GenericTime & t);
|
|
virtual bool record(double value);
|
|
virtual bool recordWithTimestamp(const double value);
|
|
virtual bool recordWithTimestamp(const BaseTime & time, const double value);
|
|
|
|
virtual size_t getValuesStored();
|
|
|
|
#if UBEEME
|
|
void setName(const char * name);
|
|
#endif
|
|
private:
|
|
cOutVector stat;
|
|
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif /* VECTORSTATISTIC_H */
|
|
|