1 #ifndef fhiclcpp_types_TableAs_h 2 #define fhiclcpp_types_TableAs_h 47 template <
typename T,
typename Config>
58 std::function<
bool()> maybeUse);
65 std::function<
bool()> maybeUse,
103 template <
typename T,
typename Config>
108 template <
typename T,
typename Config>
115 template <
typename T,
typename Config>
118 std::function<
bool()> maybeUse)
127 template <
typename T,
typename Config>
132 template <
typename T,
typename Config>
135 ,
t_{std::make_shared<T>(t)}
140 template <
typename T,
typename Config>
143 std::function<
bool()> maybeUse,
148 ,
t_{std::make_shared<T>(t)}
155 template <
typename T,
typename Config>
159 std::string
const preface =
160 "N.B. The following table is converted to type:";
161 std::string
const name =
162 " '" + cet::demangle_symbol(
typeid(T).name()) +
"'";
163 std::string
const user_comment =
164 comment.
value.empty() ?
"" :
"\n\n" + comment.value;
166 std::ostringstream oss;
167 oss << preface <<
'\n' << name << user_comment;
168 return Comment{oss.str().c_str()};
171 template <
typename T,
typename Config>
175 std::string
const preface{
"N.B. The following table is converted to type:"};
176 std::string
const name{
" '" +
177 cet::demangle_symbol(
typeid(T).name()) +
"'"};
179 std::string
const user_comment{
180 comment.
value.empty() ?
"" :
"\n\n" + comment.value};
182 std::ostringstream oss;
183 oss << preface <<
'\n' 186 return Comment{oss.str().c_str()};
std::string maybe_insert(T const &t)
OptionalTable< Config > tableObj_
Comment conversion_comment(Comment &&comment) const
typename OptionalTable< Config >::value_type via_type
void set_par_style(par_style const vt)
cet::coded_exception< error, detail::translate > exception