#ifndef H_CORAL_PYOPERATION
#define H_CORAL_PYOPERATION
// This file is part of the Coral project.
// Please read the copyright notice in the LICENSE file.

#include <coral/coral.h>
#include <string>
#include <coral/lib/ref_counted.h>
#include <coral/lib/noncopy.h>

#include <coral/lib/python_support.h>

namespace coral {
     class EXPORTFWD_coral Element;

     class EXPORT_coral PyOperation : public ref_counted, public noncopy {
     private:
	  PyObject* function;
	  bool is_a_wfr;
	  std::string language;
	  std::string code;
     public:
	  PyOperation(PyObject* _function,
		      const std::string& _language,
		      const std::string& code,
		      bool _isWFR);
	  virtual ~PyOperation() throw ();
	  PyObject* getFunc() const throw ();
	  bool isWFR() const throw () { return this->is_a_wfr; }
	  std::string getFuncName() const throw ();
	  const std::string& getCode() const throw ();
	  PyObject* __call__(coral::Element* self);
	  const std::string& getOperationLanguage() const throw () { return this->language; }
     };
}

#endif

