// +-------------------------------- DISCLAIMER ---------------------------------+
// |                                                                             |
// | This program is provided to you free of charge "as such".                   |
// | You should not assume that this program is error-free or suitable for any   |
// | purpose whatsoever.                                                         |
// |                                                                             |
// | EURESYS does not give any representation, warranty or undertaking that this |
// | program is free of any defect or error or suitable for any purpose. EURESYS |
// | shall not be liable, in contract, in torts or otherwise, for any damages,   |
// | loss, costs, expenses or other claims for compensation, including those     |
// | asserted by third parties, arising out of or in connection with the use of  |
// | this program.                                                               |
// +-----------------------------------------------------------------------------+

#pragma once

#include "stdafx.h"

class GrabberInterface
{
public:
  // Construction and destruction
  GrabberInterface(const std::string& device_name="")
  {}
  virtual ~GrabberInterface()
  {}

  // Parameter handling
  virtual void SetParameter(const std::string& name, bool value)
  {}
  virtual void SetParameter(const std::string& name, int value)
  {}
  virtual void SetParameter(const std::string& name, float value)
  {}
  virtual void SetParameter(const std::string& name, const std::string& value)
  {}

  // Acquisition control
  virtual void Start(int num_frame = 1) = 0;
  virtual long long int WaitFrame(int timeout_ms = -1) = 0;
  virtual void ReleaseFrame() = 0;
  virtual void Stop() = 0;

  // Bit depth for DepthMap and ZMap
  virtual int GetBitDepth()
  {
    return 8;
  }

  // Data retrieval
  virtual void GetDepthMap(Easy3D::EDepthMap& map)
  {
    throw("Depth Map not supported");
  }

  virtual void GetPointCloud(Easy3D::EPointCloud& pc)
  {
    throw("Point Cloud not supported");
  }

  virtual void GetZMap(Easy3D::EZMap& zmap)
  {
    throw("ZMap not supported");
  }

  // Parameter handling GUI
  virtual void InvokeParameterPanel()
  {}
};
