/***************************************************************

This is a data accumulator for the CES system. I'd have used a 
 regular array, but I thought this would be more expandable
 should I make ANOTHER structure change later.
 
 Dan, <Dec 28/2001>
 overhauled <jul 5/2002> Dan.

***************************************************************/

#ifndef _ACCUMULATOR

#define _ACCUMULATOR

class Accumulator {

 public:

  Accumulator();
  
  long   GetSize   ( void );
  long   ReadN     ( long position, char * buffer, long size );
  long   SetN      ( long destStart, long destSize, char * src, long srcSize );  
   
  ~Accumulator     ();
 
 private:
  char * Contents;
  long   ContentSize;

  int    ReSize    ( long newSize);
  long   Insert    ( long position, long size);  
  long   Remove    ( long position, long size);
  
};

#endif
