![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef _TOPCONFIGURATION_JSONUTILS_H_
6 #define _TOPCONFIGURATION_JSONUTILS_H_
16 #include <type_traits>
24 template<
typename T,
typename std::enable_if<
28 return(
value ?
"true" :
"false");
32 template<
typename T,
typename std::enable_if<
36 std::stringstream
out;
42 template<
typename T,
typename std::enable_if<
46 if (std::isfinite(
value)) {
47 std::stringstream
out;
51 return(std::isinf(
value) ? (std::signbit(
value) ?
"-Infinity" :
"Infinity") :
"NaN");
79 std::vector<std::pair<Property::Type, std::unique_ptr<ISpecializedDumper> > >
m_dispatch;
virtual ~ISpecializedDumper()
virtual std::string operator()(Property *prop)=0
std::optional< std::string > operator()(Property *prop) const
Convert the value of a property to JSON.
TopConfig A simple configuration that is NOT a singleton.
Convert values of Property instances to JSON.
Support class for PropertyMgr.
~PropertyValueJsonDumper()
PropertyValueJsonDumper()
std::string json_dump(std::string const &value)
Escape string for use in JSON format.
std::vector< std::pair< Property::Type, std::unique_ptr< ISpecializedDumper > > > m_dispatch