LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
fhicl::Atom< T > Class Template Reference

#include "type_traits.h"

Inheritance diagram for fhicl::Atom< T >:
fhicl::detail::AtomBase fhicl::detail::RegisterIfTableMember fhicl::detail::ParameterBase

Public Types

using default_type = T
 
using value_type = T
 

Public Member Functions

 Atom (Name &&name)
 
 Atom (Name &&name, Comment &&comment)
 
 Atom (Name &&name, Comment &&comment, std::function< bool()> useIf)
 
 Atom (Name &&name, T const &dflt_value)
 
 Atom (Name &&name, Comment &&comment, T const &dflt_value)
 
 Atom (Name &&name, Comment &&comment, std::function< bool()> useIf, T const &dflt_value)
 
auto const & operator() () const
 
std::string stringified_value () const
 
std::string key () const
 
std::string name () const
 
std::string comment () const
 
bool has_default () const
 
bool is_optional () const
 
bool is_conditional () const
 
par_type parameter_type () const
 
bool should_use () const
 
void set_value (fhicl::ParameterSet const &ps, bool trimParents)
 
void set_par_style (par_style const vt)
 
void set_key (std::string const &key)
 

Private Member Functions

std::string get_stringified_value () const override
 
void do_set_value (fhicl::ParameterSet const &, bool const) override
 

Private Attributes

std::shared_ptr< T > value_
 

Detailed Description

template<typename T>
class fhicl::Atom< T >

Definition at line 25 of file type_traits.h.

Member Typedef Documentation

template<typename T>
using fhicl::Atom< T >::default_type = T

Definition at line 56 of file Atom.h.

template<typename T>
using fhicl::Atom< T >::value_type = T

Definition at line 57 of file Atom.h.

Constructor & Destructor Documentation

template<typename T>
fhicl::Atom< T >::Atom ( Name &&  name)
explicit
template<typename T>
fhicl::Atom< T >::Atom ( Name &&  name,
Comment &&  comment 
)
explicit
template<typename T>
fhicl::Atom< T >::Atom ( Name &&  name,
Comment &&  comment,
std::function< bool()>  useIf 
)
explicit
template<typename T>
fhicl::Atom< T >::Atom ( Name &&  name,
T const &  dflt_value 
)
explicit
template<typename T>
fhicl::Atom< T >::Atom ( Name &&  name,
Comment &&  comment,
T const &  dflt_value 
)
explicit
template<typename T>
fhicl::Atom< T >::Atom ( Name &&  name,
Comment &&  comment,
std::function< bool()>  useIf,
T const &  dflt_value 
)
explicit

Member Function Documentation

template<typename T>
void fhicl::Atom< T >::do_set_value ( fhicl::ParameterSet const &  ,
bool  const 
)
overrideprivatevirtual
template<typename T>
std::string fhicl::Atom< T >::get_stringified_value ( ) const
overrideprivatevirtual
bool fhicl::detail::ParameterBase::is_conditional ( ) const
inlineinherited
std::string fhicl::detail::ParameterBase::key ( ) const
inlineinherited

Definition at line 44 of file ParameterBase.h.

References fhicl::detail::ParameterMetadata::key(), and fhicl::detail::ParameterBase::mdata_.

Referenced by fhicl::detail::PrintAllowedConfiguration::after_action(), fhicl::detail::ValidateThenSet::before_action(), fhicl::detail::PrintAllowedConfiguration::before_action(), fhicl::detail::SearchAllowedConfiguration::before_action(), fhicl::detail::PrintAllowedConfiguration::cacheTopLevelParameter(), detinfo::LArPropertiesStandard::Configure(), fhicl::OptionalSequence< Table< T >< art::RootInputFileSequence::Config::SecondaryFile > >::do_prepare_elements_for_validation(), fhicl::OptionalTuple< ARGS... >::do_prepare_elements_for_validation(), fhicl::OptionalSequence< T,-1ull >::do_prepare_elements_for_validation(), fhicl::detail::ValidateThenSet::enter_sequence(), fhicl::detail::PrintAllowedConfiguration::enter_sequence(), evgen::MARLEYHelper::fhicl_parameter_to_json(), fhicl::detail::SearchAllowedConfiguration::form_absolute(), fhicl::DelegatedParameter::get(), fhicl::OptionalDelegatedParameter::get_if_present(), fhicl::OptionalDelegatedParameter::hasValue(), fhicl::detail::MaybeDisplayParent::is_sequence_element(), fhicl::detail::PrintAllowedConfiguration::maybeReleaseTopLevelParameter(), fhicl::detail::RegisterIfTableMember::RegisterIfTableMember(), and fhicl::detail::PrintAllowedConfiguration::suppressFormat().

45  {
46  return mdata_.key();
47  }
template<typename T>
auto const& fhicl::Atom< T >::operator() ( ) const
inline

Definition at line 50 of file Atom.h.

51  {
52  return *value_;
53  }
std::shared_ptr< T > value_
Definition: Atom.h:60
void fhicl::detail::ParameterBase::set_key ( std::string const &  key)
inlineinherited
void fhicl::detail::ParameterBase::set_par_style ( par_style const  vt)
inlineinherited
void fhicl::detail::ParameterBase::set_value ( fhicl::ParameterSet const &  ps,
bool  trimParents 
)
inlineinherited

Definition at line 96 of file ParameterBase.h.

References fhicl::detail::ParameterBase::do_set_value().

Referenced by fhicl::detail::ValidateThenSet::after_action().

97  {
98  do_set_value(ps, trimParents);
99  }
virtual void do_set_value(fhicl::ParameterSet const &, bool trimParents)=0
bool fhicl::detail::ParameterBase::should_use ( ) const
inlineinherited
std::string fhicl::detail::AtomBase::stringified_value ( ) const
inlineinherited

Definition at line 24 of file AtomBase.h.

References fhicl::detail::AtomBase::get_stringified_value().

Referenced by fhicl::detail::PrintAllowedConfiguration::atom().

25  {
26  return get_stringified_value();
27  }
virtual std::string get_stringified_value() const =0

Member Data Documentation

template<typename T>
std::shared_ptr<T> fhicl::Atom< T >::value_
private

Definition at line 60 of file Atom.h.

Referenced by fhicl::Atom< std::int64_t >::operator()().


The documentation for this class was generated from the following files: