22 template<
bool add = true>
36 template<
typename T,
typename Base>
40 template<
typename T,
typename Base>
77 template<
typename OutputProv
ider,
typename Base = OutputProv
ider>
82 template<
typename... Args>
85 static_assert(std::is_base_of<Outputs, Base>::value,
"Cannot build for a type that is not derived of Outputs");
100 template<
typename EnumT>
103 if(!is_valid_output<OutputProvider>(e))
104 throw std::runtime_error(
"You can only disable outputs that are part of the class.");
109 throw std::runtime_error(
"Outputs have been locked, you cannot disable one.");
113 template<
typename EnumT,
typename... Args>
121 template<
typename EnumT>
124 if(!is_valid_output<OutputProvider>(e))
125 throw std::runtime_error(
"You can only disable outputs that are part of the class.");
127 if(!this->isOutputStaticallyEnabled(
static_cast<int>(e)))
128 throw std::runtime_error(
"You can not enable outputs that are statically disabled.");
133 throw std::runtime_error(
"Outputs have been locked, you cannot enable one.");
137 template<
typename EnumT,
typename... Args>
148 throw std::runtime_error(
"Enum value is invalid");
Definition: OutputSelector.h:79
void unlock()
Definition: OutputSelector.h:93
void enableOutput(EnumT e, Args... args)
Definition: OutputSelector.h:138
OutputSelector(Args &&... args)
Definition: OutputSelector.h:83
void lock()
Definition: OutputSelector.h:90
void disableOutput(EnumT e)
Definition: OutputSelector.h:101
bool isOutputCustomEnabled(int e) const override
Definition: OutputSelector.h:145
void enableOutput(EnumT e)
Definition: OutputSelector.h:122
bool isLocked() const
Definition: OutputSelector.h:96
void disableOutput(EnumT e, Args... args)
Definition: OutputSelector.h:114
constexpr bool is_output_selector()
Definition: OutputSelector.h:55
std::true_type is_output_selector_impl(OutputSelector< T, Base > const volatile &)
Definition: OutputSelector.h:24
bool locked_
Definition: OutputSelector.h:28
std::vector< bool > dynamicallyEnabled_
Definition: OutputSelector.h:26