// Author: Juan Carlos De Abreu (jcabreur@gmail.com)
//
// This file define a class inherent from singleton that allow related a 
// function to the raster button.

#ifndef DATA_RASTER_H__
#define DATA_RASTER_H__

#include "../../Base/Singleton.h"
#include "../../Base/Memory/SmartPointer.h"
#include "DataCallFunction.h"

BEGIN_TEG_NAMESPACE();

class DataRaster : public Singleton<DataRaster> {
 public:
  // DataRaster constructor and destructor.
  DataRaster();
  ~DataRaster();

  // Accessor and mutator methods to DataRaster attributes.
  inline SmartPointer<DataCallFunction> button_function() const { return button_function_; }
  inline void set_button_function(SmartPointer<DataCallFunction> button_function) { button_function_ = button_function; }

  // Method to release all the resources used by the DataRaster and to execute
  // the function related to the button.
  void Release();
  void Apply();

 private:
  // DataRaster attributes.
  SmartPointer<DataCallFunction> button_function_;
};

END_TEG_NAMESPACE();

#endif  // DATA_RASTER_H__
