LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
fhicl::Name Struct Reference

#include "Name.h"

Public Member Functions

 Name (std::string const &name="")
 

Static Public Member Functions

static Name sequence_element (std::size_t const i)
 
static Name sequence_element (std::string const &key_stem, std::size_t const i)
 
static std::string regex_safe (std::string const &key)
 

Public Attributes

std::string value
 

Static Private Member Functions

static std::string index (std::size_t const i)
 

Detailed Description

Definition at line 11 of file Name.h.

Constructor & Destructor Documentation

fhicl::Name::Name ( std::string const &  name = "")
inlineexplicit

Definition at line 13 of file Name.h.

13 : value(name) {}
std::string value
Definition: Name.h:14

Member Function Documentation

static std::string fhicl::Name::index ( std::size_t const  i)
inlinestaticprivate

Definition at line 39 of file Name.h.

References util::flags::to_string().

Referenced by sequence_element().

40  {
41  return "[" + std::to_string(i) + "]";
42  }
std::string to_string(Flag_t< Storage > const flag)
Convert a flag into a stream (shows its index).
Definition: BitMask.h:187
static std::string fhicl::Name::regex_safe ( std::string const &  key)
inlinestatic

Definition at line 32 of file Name.h.

References fhicl::get_regex_replace_str().

Referenced by fhicl::detail::ValidateThenSet::delegated_parameter(), and fhicl::detail::ValidateThenSet::enter_sequence().

33  {
34  return fhicl::get_regex_replace_str(key);
35  }
std::string const get_regex_replace_str(std::string const &istr)
Definition: Name.cc:8
static Name fhicl::Name::sequence_element ( std::size_t const  i)
inlinestatic
static Name fhicl::Name::sequence_element ( std::string const &  key_stem,
std::size_t const  i 
)
inlinestatic

Definition at line 23 of file Name.h.

References index().

24  {
25  return Name{key_stem + index(i)};
26  }
Name(std::string const &name="")
Definition: Name.h:13
static std::string index(std::size_t const i)
Definition: Name.h:39

Member Data Documentation

std::string fhicl::Name::value

Definition at line 14 of file Name.h.


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