OpenWalnut  1.4.0
Static Public Member Functions
string_utils::fromStringImpl< Target > Struct Template Reference

Conversion class to convert a string to a given target type. More...

#include <WStringUtils.h>

List of all members.

Static Public Member Functions

static Target fromString (const std::string &from)
 Convert a given string to the target type.

Detailed Description

template<typename Target>
struct string_utils::fromStringImpl< Target >

Conversion class to convert a string to a given target type.

We place this in separate classes as we are not allowed to specialize function templates. But we need specializations for certain cases.

Template Parameters:
Targettarget type

Definition at line 67 of file WStringUtils.h.


Member Function Documentation

template<typename Target >
static Target string_utils::fromStringImpl< Target >::fromString ( const std::string &  from) [inline, static]

Convert a given string to the target type.

If this fails, a exception is thrown.

Exceptions:
WTypeMismatchif source string cannot be converted to target type value.
Parameters:
fromsource string
Returns:
target value

Definition at line 78 of file WStringUtils.h.

Referenced by string_utils::fromString().


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