11 #include "eckit/exception/Exceptions.h"
20 mnemonics_(mnemonics),
21 mnemonicsStr_(makeMnemonicsStr(mnemonics)),
25 if (std::find_if(
channels.begin(),
channels.end(), [](
const auto x){ return x < 1; }) \
28 throw eckit::BadParameter(
"All channel numbers must be >= 1.");
34 std::ostringstream mnemonicsStrStream;
35 for (
auto mnemonicsIt = mnemonics.begin();
36 mnemonicsIt < mnemonics.end();
39 mnemonicsStrStream << *mnemonicsIt;
41 if (mnemonicsIt != mnemonics.end() - 1)
43 mnemonicsStrStream <<
" ";
47 return mnemonicsStrStream.str();
static std::string makeMnemonicsStr(std::vector< std::string > mnemonics)
Concatinates mnemonics into a space seperated string.
BufrMnemonicSet(const std::vector< std::string > &mnemonics, const Channels &channels={1})
std::set< size_t > Channels