AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ ArgFlags() [2/2]

template<class ContainerType , typename std::enable_if< std::is_base_of< ArgFlagVal, typename ContainerType::value_type >::value >::type * = nullptr>
drama::gitarg::ArgFlags< ContainerType, >::ArgFlags ( const ContainerType validFlagVals,
const sds::Id Id,
const unsigned  First = 1,
const unsigned  Last = 0,
const bool  FailOnInvalid = true,
const bool  IgnoreCase = true 
)
inline

Constructor with the initial value set from an SDS structure.

For each string flag name found in the argument structure, the corresponding flag value is or-ed into the resulting value. (This is a base constructor followed by Get()).

Parameters
validFlagValsA container of valid flag string values and the corresponding flag to set. Note - a flag can have multiple bits set.
IdThe SDS structure to read the flags from
FirstPosition of first argument to consider (1+)
LastPosition of last argument to consider. A value of 0 means to consider all found. Note - the first time we don't find any value (empty string or no such argument) we return immediately with the value so far.)
FailOnInvalidDo we fail (throw) if a value is found which is not a flag value. Otherwise we ignore invalid values.
IgnoreCaseIf set true, all values are converted to upper case before comparing to the possible values. Note we don't convert possible values in validFlagValues so if you set this true, please ensure all your possible values are already upper case.

References drama::CreateRunDramaTask(), and drama::gitarg::ArgFlags< ContainerType, >::Get().