Public Member Functions | Private Attributes | List of all members
ecl::Converter< std::string, int > Class 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

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 57 of file string.hpp.

Constructor & Destructor Documentation

◆ ~Converter()

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

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

Definition at line 113 of file string.hpp.

Member Function Documentation

◆ operator()()

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 77 of file string.hpp.

Member Data Documentation

◆ buffer

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

Definition at line 121 of file string.hpp.


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


ecl_converters
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:09