1 #ifndef fhiclcpp_intermediate_table_h 2 #define fhiclcpp_intermediate_table_h 51 #include "boost/any.hpp" 82 bool in_prolog =
false);
85 bool in_prolog =
false);
88 bool in_prolog =
false);
91 std::complex<T>
const& value,
92 bool in_prolog =
false);
95 std::vector<T>
const& value,
96 bool in_prolog =
false);
101 bool in_prolog =
false);
104 bool in_prolog =
false);
106 bool in_prolog =
false);
108 bool in_prolog =
false);
120 const_iterator
begin()
const;
121 const_iterator
end()
const;
127 boost::any
const& value);
148 bool in_prolog =
false);
160 template <
typename T,
typename Enable =
void>
164 template <
typename T>
168 std::is_pointer<T>::value>
::type> {
180 template <
typename U>
183 typename
tt::disable_if<std::is_reference<std::complex<U>>::value ||
184 std::is_pointer<std::complex<U>>::value>
::type> {
193 return std::complex<U>(
r,
i);
213 intermediate_table::sequence_t&
216 auto item = sequence.
locate(name);
217 if (item !=
nullptr) {
218 return boost::any_cast<intermediate_table::sequence_t&>(item->value);
221 <<
"Requested non-updatable parameter \"" << name
222 <<
"\" for update.\n";
231 intermediate_table::sequence_t
const&
234 return boost::any_cast<intermediate_table::sequence_t
const&>(
255 intermediate_table::table_t&
258 auto item = table.
locate(name);
259 if (item !=
nullptr) {
260 return boost::any_cast<intermediate_table::table_t&>(item->value);
263 <<
"Requested non-updatable parameter " << name <<
" for update.\n";
272 intermediate_table::table_t
const&
275 return boost::any_cast<intermediate_table::table_t
const&>(
282 template <
typename T>
287 return getter(*
this, name);
314 template <
typename T>
317 std::complex<T>
const&
value,
327 template <
typename T>
330 std::vector<T>
const&
value,
338 for (
auto const& item : value) {
345 template <
typename T>
378 if (located.second) {
379 result = located.first;
388 if (!located.second) {
390 <<
"Requested non-modifiable item \"" << name <<
"\" for update.\n";
392 return *located.first;
void decode(boost::any const &, std::string &)
ps_atom_t encode(std::string const &)
T operator()(intermediate_table &table, std::string const &name)
std::pair< std::string, std::string > complex_t
const XML_Char int const XML_Char * value
std::vector< extended_value > sequence_t
std::enable_if<!b, T > disable_if
std::string to_string(ModuleType mt)
std::complex< U > operator()(intermediate_table &table, std::string const &name)
cet::coded_exception< error, detail::translate > exception