Classes | Public Member Functions | List of all members
fhicl::dbid_parser Struct Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/fhiclcpp/v4_06_10/source/fhiclcpp/tokens.h"

Inheritance diagram for fhicl::dbid_parser:

Classes

struct  attribute
 

Public Member Functions

template<typename Iterator , typename Context , typename Skipper , typename Attribute >
bool parse (Iterator &first, Iterator const &last, Context &, Skipper const &skipper, Attribute &attr) const
 
template<typename Context >
boost::spirit::info what (Context &) const
 

Detailed Description

Definition at line 271 of file tokens.h.

Member Function Documentation

template<typename Iterator , typename Context , typename Skipper , typename Attribute >
bool fhicl::dbid_parser::parse ( Iterator &  first,
Iterator const &  last,
Context &  ,
Skipper const &  skipper,
Attribute &  attr 
) const
inline

Definition at line 284 of file tokens.h.

References it, fhicl::ParameterSetID::max_str_size(), fhicl::maximally_munched_number(), fillBadChanDBTables::result, and string.

289  {
290  boost::spirit::qi::skip_over(first, last, skipper);
291 
292  static std::string const allowed{"0123456789abcdefABCDEF"};
293  Iterator it = first;
294 
295  if (it == last)
296  return false;
297 
298  while (it != last && allowed.find(*it) != std::string::npos)
299  ++it;
300 
301  if (it != last && !maximally_munched_number(*it))
302  return false;
303 
304  Attribute result(first, it);
305  if (result.size() != ParameterSetID::max_str_size())
306  return false;
307 
308  first = it;
309  boost::spirit::traits::assign_to(result, attr);
310  return true;
311  }
set< int >::iterator it
static std::size_t max_str_size()
bool maximally_munched_number(char const ch)
Definition: tokens.h:35
enum BeamMode string
template<typename Context >
boost::spirit::info fhicl::dbid_parser::what ( Context &  ) const
inline

Definition at line 316 of file tokens.h.

317  {
318  return boost::spirit::info{"fhicl::dbid"};
319  }
const XML_Char XML_Encoding * info
Definition: expat.h:530

The documentation for this struct was generated from the following file: