Teuchos - Trilinos Tools Package Version of the Day
Static Public Member Functions
Teuchos::ValueTypeConversionTraits< short, std::string > Class Template Reference

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

#include <Teuchos_as.hpp>

List of all members.

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.

Detailed Description

template<>
class Teuchos::ValueTypeConversionTraits< short, std::string >

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 912 of file Teuchos_as.hpp.


Member Function Documentation

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

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 942 of file Teuchos_as.hpp.

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

Convert the given std::string to a short.

Definition at line 947 of file Teuchos_as.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines