ifw-daq
2.1.0-pre1
IFW Data Acquisition modules
|
Go to the documentation of this file.
6 #ifndef DAQ_DPM_KEYWORD_EX_HPP
7 #define DAQ_DPM_KEYWORD_EX_HPP
11 #include <string_view>
66 explicit KeywordEx(std::string_view rule);
73 explicit KeywordEx(std::initializer_list<char const*> rules) {
75 std::begin(rules), std::end(rules), std::back_inserter(m_rules), [](
auto&& value) {
86 template <
class ForwardIt,
87 typename =
typename std::enable_if_t<
88 std::is_constructible_v<std::string_view, typename ForwardIt::value_type>>>
90 std::transform(begin, end, std::back_inserter(m_rules), [](
auto&& value) {
96 constexpr std::vector<detail::Rule>
const&
GetRules() const noexcept {
103 std::vector<detail::Rule> m_rules;
132 #endif // #ifndef DAQ_DPM_KEYWORD_EX_HPP
constexpr std::vector< detail::Rule > const & GetRules() const noexcept
std::variant< ValueKeyword, EsoKeyword, LiteralKeyword > KeywordVariant
The different variants of keywords that are supported.
KeywordEx(std::initializer_list< char const * > rules)
Construct from initilizer_list of c-strings.
Contains data structure for FITS keywords.
fits::KeywordVariant KeywordTransform(fits::KeywordVariant const &keyword, std::regex const &re, char const *fmt)
Transforms keyword name using regex.
@ Eso
An ESO hiearchical keyword.
friend bool KeywordMatch(fits::KeywordVariant const &keyword, KeywordEx const &ex)
A type safe version of LiteralKeyword that consist of the three basic components of a FITS keyword ke...
Create keyword expression that memoize the provided string pattern.
KeywordEx(ForwardIt begin, ForwardIt end)
Construct from a pair of iterators.
Rule ParseEx(std::string_view ex)
Parse expression of the form documented in KeywordEx.
bool KeywordMatch(fits::KeywordVariant const &keyword, KeywordEx const &ex)
Represents a keyword rule expression.
Represents the literal 80-character FITS keyword record.