ifw-daq  3.0.0-pre2
IFW Data Acquisition modules
Public Member Functions | Protected Member Functions | Friends | List of all members
daq::dpm::KeywordEx Class Reference

Create keyword expression that memoize the provided string pattern. More...

#include <keywordEx.hpp>

Public Member Functions

 KeywordEx ()=default
 
 KeywordEx (std::string_view rule)
 Construct expresssion from single rule. More...
 
 KeywordEx (std::initializer_list< char const * > rules)
 Construct from initilizer_list of c-strings. More...
 
template<class ForwardIt , typename = typename std::enable_if_t< std::is_constructible_v<std::string_view, typename ForwardIt::value_type>>>
 KeywordEx (ForwardIt begin, ForwardIt end)
 Construct from a pair of iterators. More...
 

Protected Member Functions

constexpr std::vector< detail::Rule > const & GetRules () const noexcept
 

Friends

bool KeywordMatch (fits::KeywordVariant const &keyword, KeywordEx const &ex)
 

Detailed Description

Create keyword expression that memoize the provided string pattern.

Each rule string is defined by:

<rule> ::= <operator><scope> " " <pattern> | <operator> " " <pattern> <operator> ::= "+" | "-" <scope> ::= "v" | "e" | "c" <pattern> ::= <ascii-text> | <wildcard> | <pattern> <ascii-text> ::= [#x20 - #x7e] <wildcard> ::= "*" | "?" | "[" <ascii-text> "]"

Definition at line 59 of file keywordEx.hpp.

Constructor & Destructor Documentation

◆ KeywordEx() [1/4]

daq::dpm::KeywordEx::KeywordEx ( )
default

◆ KeywordEx() [2/4]

daq::dpm::KeywordEx::KeywordEx ( std::string_view  rule)
explicit

Construct expresssion from single rule.

Definition at line 147 of file keywordEx.cpp.

◆ KeywordEx() [3/4]

daq::dpm::KeywordEx::KeywordEx ( std::initializer_list< char const * >  rules)
inlineexplicit

Construct from initilizer_list of c-strings.

Parameters
rulesInitializer list of rules.

Definition at line 73 of file keywordEx.hpp.

◆ KeywordEx() [4/4]

template<class ForwardIt , typename = typename std::enable_if_t< std::is_constructible_v<std::string_view, typename ForwardIt::value_type>>>
daq::dpm::KeywordEx::KeywordEx ( ForwardIt  begin,
ForwardIt  end 
)
inline

Construct from a pair of iterators.

Parameters
beginbeginning of sequence.
endend of sequence.

Definition at line 89 of file keywordEx.hpp.

Member Function Documentation

◆ GetRules()

constexpr std::vector<detail::Rule> const& daq::dpm::KeywordEx::GetRules ( ) const
inlineconstexprprotectednoexcept

Definition at line 96 of file keywordEx.hpp.

Friends And Related Function Documentation

◆ KeywordMatch

bool KeywordMatch ( fits::KeywordVariant const &  keyword,
KeywordEx const &  ex 
)
friend
Template Parameters
IteratorAn iterator type to a type that can be converted to a std::string_view, such as char const**, std::vector<std::string>::const_iterator, std::list<std::string_view>::const_iterator.

Definition at line 150 of file keywordEx.cpp.


The documentation for this class was generated from the following files: