Public Member Functions | List of all members
ecl::Converter< char *, long long > Class Template Reference

Fast conversion to text format with character strings. More...

#include <char_strings.hpp>

Inheritance diagram for ecl::Converter< char *, long long >:
Inheritance graph

Public Member Functions

 Converter (char *begin, char *end)
 Converter (int buffer_size=250)
char * operator() (const long long &input)
virtual ~Converter ()

Detailed Description

class ecl::Converter< char *, long long >

Fast conversion to text format with character strings.

Provides a fast conversion to text using character strings. This implementation is based on a technique similarly used in the stlsoft libraries.

This class uses a character buffer for the character strings that it generates. Ensure your converter does not go out of scope while using the character strings otherwise your character strings will end up pointing at rubbish.

See also

Definition at line 557 of file char_strings.hpp.

Constructor & Destructor Documentation

◆ Converter() [1/2]

ecl::Converter< char *, long long >::Converter ( char *  begin,
char *  end 

Constructor that initialises with an external buffer.

begin: character pointer that points to the start of the external buffer.
end: character pointer that points to the end of the external buffer.

Definition at line 564 of file char_strings.hpp.

◆ Converter() [2/2]

ecl::Converter< char *, long long >::Converter ( int  buffer_size = 250)

Constructor that initialises with an internal buffer.

buffer_size: size of the buffer to create - if not supplied it initialises a buffer of size 250.
StandardException: throws if it failed to allocate memory for the internal buffer [debug mode only].

Definition at line 570 of file char_strings.hpp.

◆ ~Converter()

virtual ecl::Converter< char *, long long >::~Converter ( )

Reimplemented in ecl::Converter< char *, void >.

Definition at line 572 of file char_strings.hpp.

Member Function Documentation

◆ operator()()

char* ecl::Converter< char *, long long >::operator() ( const long long &  input)

Converts a long long to a char string held in the converter's buffer.

input: input value to be converted.
char* : output text string.

Definition at line 579 of file char_strings.hpp.

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

Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:34