String conversions
Collection of all the overloads of string conversions.
Functions
Name | |
---|---|
std::string | to_string_impl(const std::string & inp, empty_tag ) Conversion handler for strings. |
std::string | to_string_impl(const char * inp, empty_tag ) Conversion handler for strings. |
std::string | to_string_impl(char * inp, empty_tag ) Conversion handler for strings. |
template <typename T > std::enable_if_t< std::is_arithmetic< T >::value, T > |
from_string_impl(std::string str, type_tag< T > ) Conversion handler for all arithmetic types. |
std::string | from_string_impl(std::string str, type_tag< std::string > ) Conversion handler for strings. |
std::filesystem::path | from_string_impl(std::string str, type_tag< std::filesystem::path > ) Conversion handler for filesystem paths. |
bool | from_string_impl(std::string str, type_tag< bool > ) Conversion handler for booleans. |
template <typename T ,std::enable_if_t< std::is_arithmetic< T >::value, bool > =true> std::string |
to_string_impl(T inp, empty_tag ) Conversion handler for all arithmetic types. |
G4ThreeVector | from_string_impl(std::string str, type_tag< G4ThreeVector > ) Enable support to convert string directly to Geant4 3D vector while fetching configuration parameter. |
std::string | to_string_impl(const G4ThreeVector & vec, empty_tag ) Enable support to convert Geant4 3D vector to string for storage in the configuration. |
G4TwoVector | from_string_impl(std::string str, type_tag< G4TwoVector > ) Enable support to convert string directly to Geant4 2D vector for fetching configuration parameter. |
std::string | to_string_impl(const G4TwoVector & vec, empty_tag ) Enable support to convert Geant4 2D vector to string for storage in the configuration. |
template <typename T > ROOT::Math::DisplacementVector3D< T > |
from_string_impl(std::string str, type_tag< ROOT::Math::DisplacementVector3D< T » ) Enable support to convert string directly to ROOT 3D displacement vector while fetching configuration parameter. |
template <typename T > std::string |
to_string_impl(const ROOT::Math::DisplacementVector3D< T > & vec, empty_tag ) Enable support to convert ROOT 3D displacement vector to string for storage in the configuration. |
template <typename T > ROOT::Math::DisplacementVector2D< T > |
from_string_impl(std::string str, type_tag< ROOT::Math::DisplacementVector2D< T » ) Enable support to convert string directly to ROOT 2D displacement vector while fetching configuration parameter. |
template <typename T > std::string |
to_string_impl(const ROOT::Math::DisplacementVector2D< T > & vec, empty_tag ) Enable support to convert ROOT 2D displacement vector to string for storage in the configuration. |
template <typename T > ROOT::Math::PositionVector3D< T > |
from_string_impl(std::string str, type_tag< ROOT::Math::PositionVector3D< T » ) Enable support to convert string directly to ROOT 3D position vector while fetching configuration parameter. |
template <typename T > std::string |
to_string_impl(const ROOT::Math::PositionVector3D< T > & vec, empty_tag ) Enable support to convert ROOT 3D position vector to string for storage in the configuration. |
template <typename T > ROOT::Math::PositionVector2D< T > |
from_string_impl(std::string str, type_tag< ROOT::Math::PositionVector2D< T » ) Enable support to convert string directly to ROOT 2D position vector while fetching configuration parameter. |
template <typename T > std::string |
to_string_impl(const ROOT::Math::PositionVector2D< T > & vec, empty_tag ) Enable support to convert ROOT 2D position vector to string for storage in the configuration. |
Functions Documentation
function to_string_impl
inline std::string to_string_impl(
const std::string & inp,
empty_tag
)
Conversion handler for strings.
Note: Overloaded for different types of strings
Adds enclosing double quotation marks to properly store strings containing whitespace.
function to_string_impl
inline std::string to_string_impl(
const char * inp,
empty_tag
)
Conversion handler for strings.
Note: Overloaded for different types of strings
Adds enclosing double quotation marks to properly store strings containing whitespace.
function to_string_impl
inline std::string to_string_impl(
char * inp,
empty_tag
)
Conversion handler for strings.
Note: Overloaded for different types of strings
Adds enclosing double quotation marks to properly store strings containing whitespace.
function from_string_impl
template <typename T >
std::enable_if_t< std::is_arithmetic< T >::value, T > from_string_impl(
std::string str,
type_tag< T >
)
Conversion handler for all arithmetic types.
Exceptions:
- std::invalid_argument If the string cannot be converted to the required arithmetic type
function from_string_impl
std::string from_string_impl(
std::string str,
type_tag< std::string >
)
Conversion handler for strings.
Exceptions:
- std::invalid_argument If no closing quotation mark as last character after an opening quotation mark
- std::invalid_argument If string without enclosing quotation marks, but more data after whitespace is found
If a pair of enclosing double quotation marks is found, the whole string within the quotation marks is returned. Otherwise only the first part is read until whitespace is encountered.
function from_string_impl
std::filesystem::path from_string_impl(
std::string str,
type_tag< std::filesystem::path >
)
Conversion handler for filesystem paths.
Exceptions:
- std::invalid_argument If no closing quotation mark as last character after an opening quotation mark
- std::invalid_argument If string without enclosing quotation marks, but more data after whitespace is found
First parse as normal string and then construct path from it.
function from_string_impl
bool from_string_impl(
std::string str,
type_tag< bool >
)
Conversion handler for booleans.
Exceptions:
- std::invalid_argument If the string cannot be converted to a boolean type
Both numerical (0, 1) and textual representations (“false”, “true”) are supported for booleans. No enclosing quotation marks should be used.
function to_string_impl
template <typename T ,
std::enable_if_t< std::is_arithmetic< T >::value, bool > =true>
std::string to_string_impl(
T inp,
empty_tag
)
Conversion handler for all arithmetic types.
Conversion handler for all enum types.
function from_string_impl
inline G4ThreeVector from_string_impl(
std::string str,
type_tag< G4ThreeVector >
)
Enable support to convert string directly to Geant4 3D vector while fetching configuration parameter.
function to_string_impl
inline std::string to_string_impl(
const G4ThreeVector & vec,
empty_tag
)
Enable support to convert Geant4 3D vector to string for storage in the configuration.
function from_string_impl
inline G4TwoVector from_string_impl(
std::string str,
type_tag< G4TwoVector >
)
Enable support to convert string directly to Geant4 2D vector for fetching configuration parameter.
function to_string_impl
inline std::string to_string_impl(
const G4TwoVector & vec,
empty_tag
)
Enable support to convert Geant4 2D vector to string for storage in the configuration.
function from_string_impl
template <typename T >
inline ROOT::Math::DisplacementVector3D< T > from_string_impl(
std::string str,
type_tag< ROOT::Math::DisplacementVector3D< T >>
)
Enable support to convert string directly to ROOT 3D displacement vector while fetching configuration parameter.
function to_string_impl
template <typename T >
inline std::string to_string_impl(
const ROOT::Math::DisplacementVector3D< T > & vec,
empty_tag
)
Enable support to convert ROOT 3D displacement vector to string for storage in the configuration.
function from_string_impl
template <typename T >
inline ROOT::Math::DisplacementVector2D< T > from_string_impl(
std::string str,
type_tag< ROOT::Math::DisplacementVector2D< T >>
)
Enable support to convert string directly to ROOT 2D displacement vector while fetching configuration parameter.
function to_string_impl
template <typename T >
inline std::string to_string_impl(
const ROOT::Math::DisplacementVector2D< T > & vec,
empty_tag
)
Enable support to convert ROOT 2D displacement vector to string for storage in the configuration.
function from_string_impl
template <typename T >
inline ROOT::Math::PositionVector3D< T > from_string_impl(
std::string str,
type_tag< ROOT::Math::PositionVector3D< T >>
)
Enable support to convert string directly to ROOT 3D position vector while fetching configuration parameter.
function to_string_impl
template <typename T >
inline std::string to_string_impl(
const ROOT::Math::PositionVector3D< T > & vec,
empty_tag
)
Enable support to convert ROOT 3D position vector to string for storage in the configuration.
function from_string_impl
template <typename T >
inline ROOT::Math::PositionVector2D< T > from_string_impl(
std::string str,
type_tag< ROOT::Math::PositionVector2D< T >>
)
Enable support to convert string directly to ROOT 2D position vector while fetching configuration parameter.
function to_string_impl
template <typename T >
inline std::string to_string_impl(
const ROOT::Math::PositionVector2D< T > & vec,
empty_tag
)
Enable support to convert ROOT 2D position vector to string for storage in the configuration.
Updated on 2024-12-13 at 08:31:37 +0000