LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 10 of file Name.h.

Constructor & Destructor Documentation

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

Definition at line 12 of file Name.h.

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

Member Function Documentation

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

Definition at line 38 of file Name.h.

References util::to_string().

Referenced by sequence_element().

39  {
40  return "[" + std::to_string(i) + "]";
41  }
decltype(auto) constexpr to_string(T &&obj)
ADL-aware version of std::to_string.
static std::string fhicl::Name::regex_safe ( std::string const &  key)
inlinestatic

Definition at line 31 of file Name.h.

References fhicl::get_regex_replace_str().

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

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

Definition at line 22 of file Name.h.

References index().

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

Member Data Documentation

std::string fhicl::Name::value

Definition at line 13 of file Name.h.


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