#ifndef __FORENSICS_SHIFTDATASOURCE_HH__
#define __FORENSICS_SHIFTDATASOURCE_HH__

#include "forensics.hh"
#include "datasource.hh"


class ShiftDataSource : public DataSource 
{
protected:
  DataSource& m_parent;
  Gecode::IntVar m_unavailable;
  int64_t m_block_offset;

public:
  ShiftDataSource (Gecode::Space& home, DataSource& parent, int64_t block_offset);

  ShiftDataSource (bool share, Gecode::Space& home, DataSource& parent, ShiftDataSource& ds);

  virtual Gecode::IntVar& unavailable ();

  virtual unsigned char read (int64_t offset) const;
  virtual void read (int64_t block, unsigned char* buffer) const;

  virtual void print (std::ostream& os) const;
};

#endif

