#ifndef __MESSAGESTATISTICS_H_
#define __MESSAGESTATISTICS_H_

#include "Messages.h"

class MessageStatistics : public Messages {
  private:
    static MessageStatistics *instance;

    MessageStatistics();
    ~MessageStatistics();

    unsigned int data[ NUM_MESSAGE_TYPES ];
    unsigned int getIndex(MessageType msgType, Direction direction) const;

  public:
    static MessageStatistics * getInstance();
    static void deleteInstance();
    
    unsigned int getLength() const;
    const unsigned int * getData() const;
    unsigned int get( MessageType msgType, Direction direction ) const;
    
    void reset( MessageType msgType, Direction direction );
    void reset();
    void increment( MessageType msgType, Direction direction, unsigned int amount = 1u );
};

#endif /* __MESSAGESTATISTICS_H_ */
