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

Converts int to string, convenient but slow. More...

#include <string.hpp>

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

Public Member Functions

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

Private Attributes

char buffer [31]
 

Detailed Description

template<>
class ecl::Converter< std::string, int >

Converts int to string, convenient but slow.

Slightly slower but convenient (no need for preallocating buffers) conversion of int to a string. This implementation is based on a technique similarly used in the stlsoft libraries.

See also
Converter

Definition at line 51 of file string.hpp.

Constructor & Destructor Documentation

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

Reimplemented in ecl::Converter< std::string, void >.

Definition at line 99 of file string.hpp.

Member Function Documentation

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

Converts an integer into a string.

This is slow in comparison to the buffered character string functions. There is no need for error handling here as it will always work.

Parameters
input: the integer to be converted.
Returns
string : the string representation of the integer.

Definition at line 63 of file string.hpp.

Member Data Documentation

char ecl::Converter< std::string, int >::buffer[31]
private

Definition at line 107 of file string.hpp.


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


ecl_converters
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:22