OpenWalnut  1.4.0
Public Member Functions | List of all members
PROPERTY_TYPE_HELPER::WStringConversion< T > Class Template Reference

Class helping to create a new instance of the property content from an old one. More...

#include <WPropertyTypes.h>

Public Member Functions

create (const T &, const std::string str)
 Creates a new instance of the type from a given string. More...
 
std::string asString (const T &v)
 Creates a string from the specified value. More...
 

Detailed Description

template<typename T>
class PROPERTY_TYPE_HELPER::WStringConversion< T >

Class helping to create a new instance of the property content from an old one.

This might be needed by some types (some need to have a predecessor for creation). You only need to specialize this class for types not allowing the direct use of string_utils::fromString

Definition at line 326 of file WPropertyTypes.h.

Member Function Documentation

template<typename T>
std::string PROPERTY_TYPE_HELPER::WStringConversion< T >::asString ( const T &  v)
inline

Creates a string from the specified value.

Parameters
vthe value to convert
Returns
the string representation

Definition at line 348 of file WPropertyTypes.h.

References string_utils::toString().

Referenced by WPropertyVariable< T >::getAsString().

template<typename T>
T PROPERTY_TYPE_HELPER::WStringConversion< T >::create ( const T &  ,
const std::string  str 
)
inline

Creates a new instance of the type from a given string.

Some classes need a predecessor which is also specified here.

Parameters
strthe new value as string
Returns
the new instance

Definition at line 336 of file WPropertyTypes.h.

Referenced by WPropertyVariable< T >::setAsString().


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