#ifndef AVIFILE_STATISTIC_H
#define AVIFILE_STATISTIC_H

#define STAT_SIZE 25

#include "except.h"

class Statistic
{
    char* m_pName;
    float* m_pValues;
    unsigned int m_uiSize;
    unsigned int m_uiPos;
    double m_dSum;

public:
    explicit Statistic(const char* name, unsigned int msize = STAT_SIZE) throw(FatalError);
    ~Statistic();

    float average() const;
    void insert(float v);
    const char* getName() const;
};

#endif // AVIFILE_STATISTIC_H
