// __author__ = Juan Carlos De Abreu (jcabreur@gmail.com)
//
// This file define an inherent class IData that allow have returns inside of a
// funtion.

#ifndef DATA_RETURN_H__
#define DATA_RETURN_H__
 
#include "../DataTypes/Data.h"

BEGIN_TEG_NAMESPACE();

class DataReturn : public IData {
public:
  // Attributes.
  SmartPointer<IData> value;

  // DataReturn constructor.
  DataReturn(const SmartPointer<IData>& value_);

  // DataReturn destructor.
  ~DataReturn();

  // Methods.
  AUTO_SIZE();
  SmartPointer<IData> resolve(
      std::map<std::string, SmartPointer<IData>>& variables);
};

SmartPointer<DataReturn> castToDataReturn(SmartPointer<IData> d);

END_TEG_NAMESPACE();

#endif // DATA_RETURN_H__
