diff --git a/ModelsAPI/UnitParametersEnum.h b/ModelsAPI/UnitParametersEnum.h index 328d8bb..b7982ce 100644 --- a/ModelsAPI/UnitParametersEnum.h +++ b/ModelsAPI/UnitParametersEnum.h @@ -31,9 +31,19 @@ enum class EUnitParameter : uint8_t PARAM_DEPENDENT = 17, ///< Dependent unit parameter. }; +/** + * \private + * A helper class to hold a collection of unit parameters. + */ template struct UnitParameterCollection { + /** + * \private + * Finds the parameter of the specified type. + * \param _param Type of the parameter to find. + * \return Found parameter type. + */ static constexpr EUnitParameter Find(EUnitParameter _param) { EUnitParameter result = EUnitParameter::UNKNOWN; @@ -41,6 +51,12 @@ struct UnitParameterCollection return result; } + /** + * \private + * Checks if the collection contains the specified parameter type. + * \param _type Type of the parameter to check. + * \return True if the collection contains the specified parameter type, false otherwise. + */ static constexpr bool Has(EUnitParameter _type) { return ((_type == Args) || ...);