15 unsigned int n_paramter_sets,
16 const char*
const* param_names,
17 unsigned int n_paramters)
const
19 if (
params().size() != n_paramter_sets ) {
20 std::stringstream message;
21 message <<
label <<
": Expecting parameters for 2 parameters for";
22 for (
unsigned int idx=0; idx < n_paramter_sets; ++idx) {
23 message <<
" " << param_names[idx];
25 message <<
" But got " <<
params().size() <<
".";
26 throw std::runtime_error( message.str() );
28 for (
unsigned int idx=0; idx<
params().size(); ++idx) {
29 if (
params()[idx].size() != n_paramters) {
30 assert( idx < n_paramter_sets );
31 std::stringstream message;
32 message <<
label <<
": Expected 2 parameters for " << param_names[idx] <<
" but got " <<
params()[idx].size()
34 throw std::runtime_error( message.str() );
void checkParameters(const char *label, unsigned int n_paramter_sets, const char *const *param_names, unsigned int n_paramters) const
Convenience function to check whether the number of parameters is correct.