| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Protected Member Functions | List of all members
Gaudi::Details::Property::DefaultStringConverterImpl< TYPE > Struct Template Referenceabstract

`#include <GaudiKernel/Property.h>`

Inheritance diagram for Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >:
[legend]

## Public Member Functions
virtual | ~DefaultStringConverterImpl ()=default
std::string | toString (const TYPE &v)
virtual TYPE | fromString (const TYPE &ref_value, const std::string &s)=0
template<>
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 166 of file Property.h.

## Constructor & Destructor Documentation

## ◆ ~DefaultStringConverterImpl()

template<class TYPE >

virtual Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >::~DefaultStringConverterImpl | ( |  | ) |
| virtual default

## Member Function Documentation

## ◆ fromString()

template<class TYPE >

virtual TYPE Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >::fromString | ( | const TYPE & | ref_value,
|  | const std::string & | s
| ) |  |
| pure virtual

Implemented in Gaudi::Details::Property::DefaultStringConverter< TYPE, std::enable_if_t< std::is_default_constructible_v< TYPE > > >, Gaudi::Details::Property::DefaultStringConverter< TYPE, Enable >, and Gaudi::Details::Property::DefaultStringConverter< TYPE >.

## ◆ fromStringImpl()

template<class TYPE >

void Gaudi::Details::Property::DefaultStringConverterImpl< TYPE >::fromStringImpl | ( | TYPE & | buffer,
|  | const std::string & | s
| ) |  |
| inline protected

Definition at line 180 of file Property.h.

180 {
181 using Gaudi::Parsers::InputData;
182 if ( !parse( buffer, InputData{s} ).isSuccess() ) {
183 throw std::invalid_argument( "cannot parse '" + s + "' to " + System::typeinfoName( typeid( TYPE ) ) );
184 }
185 }
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:298
parse
StatusCode parse(DataObjID &dest, const std::string &src)
Definition: DataObjID.cpp:46
Gaudi::Parsers::InputData
Helper class to enable ADL for parsers.
Definition: InputData.h:8
gaudirun.s
string s
Definition: gaudirun.py:316
std::invalid_argument
STL class.

## ◆ toString() [1/2]

template<class TYPE >

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

Definition at line 169 of file Property.h.

169 {
170 using Gaudi::Utils::toString;
171 return toString( v );
172 }
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:334
Gaudi::Details::Property::DefaultStringConverterImpl::toString
std::string toString(const TYPE &v)
Definition: Property.h:169

## ◆ toString() [2/2]

template<>

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

Definition at line 189 of file Property.h.

189 {
190 return v;
191 }

The documentation for this struct was generated from the following file:

- GaudiKernel/GaudiKernel/Property.h