LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
fhicl::detail::no_defaults Namespace Reference

Classes

struct  expected_types
 
struct  expected_types< std::string >
 

Functions

std::string stripped_typename (std::string const &fullName)
 
std::string padded_string (std::string const &tnToPad)
 
std::string presented_string (std::string const &fullName)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, expected_types< T > &&et)
 

Function Documentation

template<typename T >
std::ostream& fhicl::detail::no_defaults::operator<< ( std::ostream &  os,
expected_types< T > &&  et 
)

Definition at line 100 of file ostream_helpers.h.

101  {
102  return os << et.value;
103  }
std::string fhicl::detail::no_defaults::padded_string ( std::string const &  tnToPad)
inline

Definition at line 64 of file ostream_helpers.h.

Referenced by fhicl::detail::no_defaults::expected_types< T >::expected_types(), fhicl::detail::no_defaults::expected_types< std::string >::expected_types(), and presented_string().

65  {
66  return std::string("<") + tnToPad + std::string(">");
67  }
std::string fhicl::detail::no_defaults::presented_string ( std::string const &  fullName)
inline

Definition at line 70 of file ostream_helpers.h.

References padded_string(), and stripped_typename().

71  {
72  return padded_string(stripped_typename(fullName));
73  }
std::string stripped_typename(std::string const &fullName)
std::string padded_string(std::string const &tnToPad)
std::string fhicl::detail::no_defaults::stripped_typename ( std::string const &  fullName)

Definition at line 13 of file ostream_helpers.cc.

Referenced by fhicl::detail::no_defaults::expected_types< T >::expected_types(), fhicl::detail::no_defaults::expected_types< std::string >::expected_types(), fhicl::detail::yes_defaults::operator<<(), and presented_string().

14  {
15  // Remove 'std::' from fullName
16  std::string const strippedName =
17  std::regex_replace(fullName, std::regex("std::"), "");
18  return strippedName;
19  }