Skip to content

Commit

Permalink
docs: Fix API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vasylskorych committed Dec 7, 2024
1 parent 5c23156 commit aa5972f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ModelsAPI/UnitParametersEnum.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,32 @@ enum class EUnitParameter : uint8_t
PARAM_DEPENDENT = 17, ///< Dependent unit parameter.
};

/**
* \private
* A helper class to hold a collection of unit parameters.
*/
template<EUnitParameter... Args>
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;
(((_param == Args) ? (result = Args) : result), ...);
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) || ...);
Expand Down

0 comments on commit aa5972f

Please sign in to comment.