#ifndef ButtonDifference_h
#define ButtonDifference_h

#include <vector>
#include "SampleDifference.h"

class OneButton;

// ButtonDifference is a class holding the differences between the samples.
// It is computed from the samples in some OneButton object.
//
class ButtonDifference {
public:

   ButtonDifference(OneButton * one_button);

   virtual
   ~ButtonDifference();

      // How many differences do we have for this button?
      //
   unsigned int
   NumDiffs() const;

      // Fetch the Nth sample difference (or NULL if ndx out of range).
      //
   SampleDifference *
   operator[](unsigned int ndx) const;

   unsigned long
   MaxDiffTime() {
         return max_diff_time;
      }

   double
   LogMaxDiffTime() {
         return log_max_diff_time;
      }

private:

   std::vector<SampleDifference *> diff;

   unsigned long max_diff_time;
   double        log_max_diff_time;
};

#endif // ButtonDifference_h
