| The Gaudi Framework v30r0 (c919700c)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Gaudi::Details::Property::StringConverter< TYPE > Struct Template Reference

`#include <GaudiKernel/Property.h>`

## Public Member Functions
std::string | toString (const TYPE &v)
TYPE | fromString (const std::string &s)
template<>
std::string | toString (const std::string &v)

## Detailed Description

### template<class TYPE>
struct Gaudi::Details::Property::StringConverter< TYPE >

Definition at line 154 of file Property.h.

## Member Function Documentation

template<class TYPE >

TYPE Gaudi::Details::Property::StringConverter< TYPE >::fromString | ( | const std::string & | s | ) |
| inline

Definition at line 160 of file Property.h.

161 {
162 TYPE tmp{};
163 using Gaudi::Parsers::parse;
164 if ( !parse( tmp, s ).isSuccess() ) {
165 throw std::invalid_argument( "cannot parse '" + s + "' to " + System::typeinfoName( typeid( TYPE ) ) );
166 }
167 return tmp;
168 }
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:336
Gaudi::Parsers::parse
StatusCode parse(GaudiUtils::HashMap< K, V > &result, const std::string &input)
Basic parser for the types of HashMap used in DODBasicMapper.
Definition: DODBasicMapper.cpp:13
std::invalid_argument
STL class.
template<class TYPE >

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

Definition at line 155 of file Property.h.

156 {
157 using Gaudi::Utils::toString;
158 return toString( v );
159 }
Gaudi::Details::Property::StringConverter::toString
std::string toString(const TYPE &v)
Definition: Property.h:155
Gaudi::Utils::toString
std::string toString(const TYPE &obj)
the generic implementation of the type conversion to the string
Definition: ToStream.h:346
template<>

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

Definition at line 171 of file Property.h.

172 {
173 return v;
174 }

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

- GaudiKernel/GaudiKernel/Property.h