17# pragma clang diagnostic push
20# pragma clang diagnostic ignored "-Wkeyword-macro"
22#include <boost/regex.hpp>
24# pragma clang diagnostic pop
81 boost::sregex_iterator
m_it;
88 static const boost::sregex_iterator endmark;
89 if (
m_it != endmark ) {
93 static const boost::regex varexp{
"\\$\\{([^}]+)\\}" };
97 m_attrib.value = boost::regex_replace(
99 [&i](
const boost::smatch& m ) -> std::string {
100 const std::string name = m[1];
101 const char* cname = name.c_str();
102 if ( System::isEnvSet( cname ) ) {
104 return System::getEnv( cname );
108 boost::match_default | boost::format_all );
129 boost::sregex_iterator
parse()
const {
130 static const boost::regex exp{
"[[:space:]]*([^[:space:]]+)[[:space:]]*=[[:space:]]*'(.*?)'" };
boost::spirit::classic::position_iterator2< ForwardIterator > Iterator
Iterator to loop over the tag/value pairs in the attribute string.
Iterator(const boost::sregex_iterator &it, bool expand_vars)
Iterator(const Iterator &other)
bool operator!=(const Iterator &other)
Iterator(Iterator &&other)
std::input_iterator_tag iterator_category
void i_setAttrib()
Helper method used to update the cached Attrib instance when dereferencing the iterator.
Attrib m_attrib
Cached Attrib instance.
boost::sregex_iterator m_it
Wrapped boost::sregex_iterator instance.
bool operator==(const Iterator &other)
std::ptrdiff_t difference_type
Parse attribute strings allowing iteration over the various attributes.
boost::sregex_iterator parse() const
AttribStringParser(std::string data, bool expand_vars=true)
Initialize the parsing of an attribute string.
friend Iterator begin(const AttribStringParser &)
AttribStringParser::Iterator begin(const AttribStringParser &parser)
AttribStringParser::Iterator end(const AttribStringParser &)
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Simple class to wrap tag/value pairs.