Public Member Functions | List of all members
ecl::Converter< int, std::string > Class Reference

Conversion from a string to an integer type. More...

#include <integers.hpp>

Inheritance diagram for ecl::Converter< int, std::string >:
Inheritance graph
[legend]

Public Member Functions

int operator() (const std::string &input)
 Converts a string to an integer type. More...
 
virtual ~Converter ()
 

Detailed Description

Conversion from a string to an integer type.

Very quick conversions to an int type. These are partially based on the stlsoft techniques.

Definition at line 49 of file integers.hpp.

Constructor & Destructor Documentation

◆ ~Converter()

virtual ecl::Converter< int, std::string >::~Converter ( )
inlinevirtual

Definition at line 59 of file integers.hpp.

Member Function Documentation

◆ operator()()

int ecl::Converter< int, std::string >::operator() ( const std::string &  input)
inline

Converts a string to an integer type.

This throws an exception and/or configures the error() function for this converter if the input does not consist purely of the appropriate digits for an integer.

Parameters
input: the input string to be converted.
Returns
int : the integer representation, INT_MIN on error.
Exceptions
StandardException: throws if conversion failed (debug mode only).

Definition at line 71 of file integers.hpp.


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


ecl_converters
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:16:25