Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Teuchos::ValueTypeConversionTraits< short, std::string > Class Reference

Convert an std::string to a short. More...

#include <Teuchos_as.hpp>

Inheritance diagram for Teuchos::ValueTypeConversionTraits< short, std::string >:

Static Public Member Functions

static short safeConvert (const std::string &t)
 Convert the given std::string to a short, with checks.
 
static short convert (const std::string &t)
 Convert the given std::string to a short.
 
static short convert (const std::string t)
 Convert t from a TypeFrom object to a TypeTo object.
 
static short safeConvert (const std::string t)
 Convert t from a TypeFrom object to a TypeTo object, with checks for validity.
 

Static Private Member Functions

static long safeConvertToLong (const std::string &t)
 Convert the given std::string to an intermediate long, with checks.
 

Detailed Description

Convert an std::string to a short.

We assume the string stores a base-10 integer, if it stores an integer at all.

Definition at line 929 of file Teuchos_as.hpp.

Member Function Documentation

◆ safeConvertToLong()

static long Teuchos::ValueTypeConversionTraits< short, std::string >::safeConvertToLong ( const std::string & t)
inlinestaticprivate

Convert the given std::string to an intermediate long, with checks.

Definition at line 932 of file Teuchos_as.hpp.

◆ safeConvert() [1/2]

static short Teuchos::ValueTypeConversionTraits< short, std::string >::safeConvert ( const std::string & t)
inlinestatic

Convert the given std::string to a short, with checks.

If the string overflows short, this throws std::range_error. If it does not contain an integer, this throws std::invalid_argument.

Definition at line 959 of file Teuchos_as.hpp.

◆ convert() [1/2]

static short Teuchos::ValueTypeConversionTraits< short, std::string >::convert ( const std::string & t)
inlinestatic

Convert the given std::string to a short.

Definition at line 964 of file Teuchos_as.hpp.

◆ convert() [2/2]

static short Teuchos::ValueTypeConversionTraits< short, std::string >::convert ( const std::string t)
inlinestatic

Convert t from a TypeFrom object to a TypeTo object.

Definition at line 182 of file Teuchos_as.hpp.

◆ safeConvert() [2/2]

static short Teuchos::ValueTypeConversionTraits< short, std::string >::safeConvert ( const std::string t)
inlinestatic

Convert t from a TypeFrom object to a TypeTo object, with checks for validity.

Definition at line 189 of file Teuchos_as.hpp.


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