// Sorted buffer.
// Fixed size buffer of integers, held in increasing order.

#ifndef SORTED_BUFFER_H
#define SORTED_BUFFER_H

#include "buffer.h"

class sorted_buffer : public buffer
{

public:      ///// Public interface:

  sorted_buffer(unsigned capacity=100) : buffer(capacity) {}

  void add(int);                // Overridden to add in sorted order.

private:     ///// Private implementation details.

  void decrement(int);
};

#endif
