#pragma once
#include "../../World/TechObject.h"
#include "InBuildingMonitoringProcess.h"

class TechTypeObject;

/**
 * @brief Process used to monitor the completion of technologies.
 */
class TechMonitoringProcess : public InBuildingMonitoringProcessT<TechMonitoringProcess>
{
public:
  TechMonitoringProcess(const Process* parent, BWAPI::Unit* building, TechTypeObject* tech);
  virtual void cancel();
protected:
  friend class MonitoringProcessT<TechMonitoringProcess>;
  friend class InBuildingMonitoringProcessT<TechMonitoringProcess>;
  virtual void _output(std::ostream& out) const;
  bool testCompletion();
  void setNewTimeout(bool error);

  TechTypeObject* const m_tech;
};