Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Formatter Class Reference

This class provides some basic int to string conversion methods. More...

#include <Formatter.hpp>

List of all members.

Static Public Member Functions

template<class T>
static void IntToStringBack (T n, char *buffer, std::streamsize &pos)
 Convers an integer to string; the characters are placed in a backward manner.
template<class T>
static void IntToStringFront (T n, char *buffer, std::streamsize &pos)
 Convers an integer to string; the characters are placed in a forward manner.
static void SupportToStringBack (counter_t support, char *buffer, std::streamsize &pos)
 Generates the string representation of a support, i.e it converts the int to string and puts parenthesis around it.
template<typename InputIterator>
static void ItemsetToStringBack (InputIterator first, InputIterator last, char *buffer, std::streamsize &pos)
 Convers a sequence of integers to string; the characters are placed in a backward manner.


Detailed Description

This class provides some basic int to string conversion methods.

Author:
Ferenc Bodon

Definition at line 12 of file Formatter.hpp.


Member Function Documentation

template<class T>
void Formatter::IntToStringBack n,
char *  buffer,
std::streamsize &  pos
[inline, static]
 

Convers an integer to string; the characters are placed in a backward manner.

Parameters:
n the integer
buffer the character buffer that will store the string representation of the integer
pos this parameter gives the position of the buffer where the last character of the representation is put. When the function exits, pos will store the position before the first character of the representation.

Definition at line 49 of file Formatter.hpp.

Referenced by ItemsetToStringBack(), CacheDecoderBase< FR >::setCodeInverse(), and CacheDFDecoder< FR >::write().

template<class T>
void Formatter::IntToStringFront n,
char *  buffer,
std::streamsize &  pos
[inline, static]
 

Convers an integer to string; the characters are placed in a forward manner.

Parameters:
n the integer
buffer the character buffer that will store the string representation of the integer
pos this parameter gives the position of the buffer where the first character of the representation is put. When the function exits, pos will store the position after the last character of the representation.

Definition at line 73 of file Formatter.hpp.

Referenced by SimpleBufferedDFDecoder< FR >::pushItem(), and SimpleBufferedDFDecoder< FR >::write().

template<typename InputIterator>
void Formatter::ItemsetToStringBack InputIterator  first,
InputIterator  last,
char *  buffer,
std::streamsize &  pos
[inline, static]
 

Convers a sequence of integers to string; the characters are placed in a backward manner.

Definition at line 120 of file Formatter.hpp.

References IntToStringBack().

Referenced by main(), and BufferedNormalOutput< StreamRepr >::writeItemsetAndCounter().

void Formatter::SupportToStringBack counter_t  support,
char *  buffer,
std::streamsize &  pos
[inline, static]
 

Generates the string representation of a support, i.e it converts the int to string and puts parenthesis around it.

Parameters:
support the support value
buffer the character buffer that will store the string representation
pos this parameter gives the position of the buffer where the closing parenthesis is put. When the function exits, pos will store the position before opening parenthesis.

Definition at line 106 of file Formatter.hpp.

Referenced by CacheNormalDecoder< FR >::writeItemsetAndCounter(), and BufferedNormalOutput< StreamRepr >::writeItemsetAndCounter().


The documentation for this class was generated from the following file:
Generated on Sun Sep 17 17:55:20 2006 for FIM environment by  doxygen 1.4.4