#pragma once
#include <BWAPI/Type.h>

namespace BWAPI
{
  /// <summary>Namespace containing unit size types.</summary>
  ///
  /// @see UnitSizeType
  ///
  /// [View on Starcraft Campendium (Official Website)](http://classic.battle.net/scc/gs/damage.shtml)<br>
  namespace UnitSizeTypes
  {
    /// <summary>Enumeration of unit size types.</summary>
    /// @see UnitSizeType
    namespace Enum
    {
      /// <summary>Enumeration of unit size types.</summary>
      /// @see UnitSizeType
      enum Enum
      {
        Independent = 0,
        Small,
        Medium,
        Large,
        None,
        Unknown,
        MAX
      };
    };
  };

  /// <summary>Size types are used by unit types in Broodwar to determine how much damage will be
  /// applied.</summary> This corresponds with DamageType for several different damage reduction
  /// applications.
  ///
  /// @see DamageType, UnitType, UnitSizeTypes
  ///
  /// [View on Starcraft Campendium (Official Website)](http://classic.battle.net/scc/gs/damage.shtml)<br>
  /// @ingroup TypeClasses
  class UnitSizeType : public Type<UnitSizeType, UnitSizeTypes::Enum::Unknown>
  {
  public:
    /// @copydoc Type::Type(int)
    UnitSizeType(int id = UnitSizeTypes::Enum::None);
  };

  /// @ingroup Types
  namespace UnitSizeTypes
  {
    /// <summary>Retrieves the set of all valid UnitSizeTypes.</summary>
    ///
    /// @returns Set of all UnitSizeTypes.
    const UnitSizeType::set& allUnitSizeTypes();
    
    extern const UnitSizeType Independent;
    extern const UnitSizeType Small;
    extern const UnitSizeType Medium;
    extern const UnitSizeType Large;
    extern const UnitSizeType None;
    extern const UnitSizeType Unknown;
  }

  static_assert(sizeof(UnitSizeType) == sizeof(int), "Expected type to resolve to primitive size.");
}
