The Gaudi Framework  master (594c33fa)
Gaudi::Details::Property::DefaultStringConverterImpl< TYPE > Struct Template Referenceabstract

#include </builds/gaudi/Gaudi/GaudiKernel/include/Gaudi/Details/Property.h>

Inheritance diagram for Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >:

Public Member Functions

virtual ~DefaultStringConverterImpl ()=default
 
std::string toString (const TYPE &v)
 
virtual TYPE fromString (const TYPE &ref_value, const std::string &s)=0
 
std::string toString (const std::string &v)
 

Protected Member Functions

void fromStringImpl (TYPE &buffer, const std::string &s)
 

Detailed Description

template<class TYPE>
struct Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >

Definition at line 48 of file Property.h.

Constructor & Destructor Documentation

◆ ~DefaultStringConverterImpl()

template<class TYPE >
virtual Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >::~DefaultStringConverterImpl ( )
virtualdefault

Member Function Documentation

◆ fromString()

◆ fromStringImpl()

template<class TYPE >
void Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >::fromStringImpl ( TYPE &  buffer,
const std::string s 
)
inlineprotected

Definition at line 62 of file Property.h.

62  {
64  if ( !parse( buffer, InputData{ s } ).isSuccess() ) {
65  throw std::invalid_argument( "cannot parse '" + s + "' to " + System::typeinfoName( typeid( TYPE ) ) );
66  }
67  }

◆ toString() [1/2]

Definition at line 72 of file Property.h.

72  {
73  return v;
74  }

◆ toString() [2/2]

template<class TYPE >
std::string Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >::toString ( const TYPE &  v)
inline

Definition at line 51 of file Property.h.

51  {
53  return toString( v );
54  }

The documentation for this struct was generated from the following file:
gaudirun.s
string s
Definition: gaudirun.py:346
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:313
Gaudi::Parsers::InputData
Helper class to enable ADL for parsers.
Definition: InputData.h:18
std::invalid_argument
STL class.
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:354
parse
StatusCode parse(DataObjID &dest, std::string_view src)
Definition: DataObjID.cpp:57
Properties.v
v
Definition: Properties.py:122
Gaudi::Details::Property::DefaultStringConverterImpl::toString
std::string toString(const TYPE &v)
Definition: Property.h:51