#pragma once
#include "TechObject.h"

class CurrentWorld;
class UpgradeMonitoringProcess;

/**
 * @brief An upgrade (in BWAPI terms) boosts some characteristics of one or several types of units.
 *        An upgrade is said to be acquired when it actually finishes researching.
 */
class UpgradeTypeObject : public TechObject
{
public:
  UpgradeTypeObject(BWAPI::UpgradeType upgradeType, int level);
  UpgradeTypeObject(BWAPI::UpgradeType upgradeType);
  BWAPI::UpgradeType getUpgrade() const { return m_upgradeType; }
  int getLevel() const { return m_level; }
protected:
  friend class CurrentWorld;
  friend class UpgradeMonitoringProcess;
  virtual void _output(std::ostream& out) const
  {
    TechObject::_output(out);
    out << " level " << m_level;
  }
  const BWAPI::UpgradeType m_upgradeType;
  const int m_level;
};
