Fast conversion to text format with character strings. More...
#include <char_strings.hpp>
Public Member Functions | |
Converter (char *begin, char *end) | |
Converter (int buffer_size=250) ecl_debug_throw_decl(StandardException) | |
char * | operator() (const int &input) |
virtual | ~Converter () |
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.
Definition at line 376 of file char_strings.hpp.
ecl::Converter< char *, int >::Converter | ( | char * | begin, |
char * | end | ||
) | [inline] |
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. |
Reimplemented in ecl::Converter< char *, void >.
Definition at line 383 of file char_strings.hpp.
ecl::Converter< char *, int >::Converter | ( | int | buffer_size = 250 | ) | [inline] |
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]. |
Reimplemented in ecl::Converter< char *, void >.
Definition at line 389 of file char_strings.hpp.
virtual ecl::Converter< char *, int >::~Converter | ( | ) | [inline, virtual] |
Reimplemented in ecl::Converter< char *, void >.
Definition at line 391 of file char_strings.hpp.
char* ecl::Converter< char *, int >::operator() | ( | const int & | input | ) | [inline] |
Converts a int to a char string held in the converter's buffer.
input | : input value to be converted. |
Definition at line 398 of file char_strings.hpp.