// --------------------------------------------------------------------
//   SPECIFICATION FILE (numvec.h)
//   This module exports a NumVec Class.
//
//   Brad Duska
// --------------------------------------------------------------------

#ifndef NUMVEC_H
#define NUMVEC_H

#include "bool.h"

const int NUMVEC_INCREMENT = 100;

class NumVec {

public:
   // Constructor
   NumVec();

   // Copy Constructor
   NumVec( /* in */ const NumVec& anotherVec );
   NumVec operator=( /* in */ const NumVec& anotherVec );

   // Destructor
   ~NumVec();

   void Store(int location, int value);
   int ValueAt( /* in */ int location ) const;
   void Print() const;
   int getSize() const;

private:
   // contains a pointer to the data  
   int * data;
   
   // the current number of elements in this NumVec. 0...size-1
   long size;

   // how many elements this NumVec can currently hold, before it must be expanded, 0...maxSize-1
   long maxSize;

   // the size to increase the data array by when
   // the current maxSize is exceeded
   int increment;

   void Expand(int amount);
   void Deallocate( /* inout */ int* & fpoint );
   void Copy( /* in */ const NumVec& anotherVec );
};
#endif
