// Zähler-Array-Klasse, Header
//
// Klaus Kusche, 2012

#ifndef _COUNTER_H
#define _COUNTER_H

class Counter {
  
  public:
    Counter(unsigned int sz);
    Counter(const Counter &a);

    ~Counter() {
      delete[] counts;
    }

    unsigned int getSize() const { return size; }
    int getCnt(unsigned int val) const;

    Counter operator+(const Counter &a) const;
    Counter operator+(unsigned int val) const;
    bool operator<=(const Counter &a) const;

    Counter &operator=(const Counter &a);
    
  private:
    unsigned int size;
    int *counts;
};

#endif
