Showing posts with label ACCU. Show all posts
Showing posts with label ACCU. Show all posts

Thursday, October 14, 2010

FastFormat 0.6.2 released

I've just released version 0.6.2 of FastFormat, containing a number of improvements and several new features, which will be detailed in a series of forthcoming posts on this blog. The new features include the flush() function, whose purpose and behaviour is described in the latest instalment of my Quality Matters column in October's instalment of ACCU's Overload.

Wednesday, June 2, 2010

format_iterator on Dr Dobb's

Dr. Dobb's have just published a new article, "C++ and format_iterator", describing the design and implementation of the FastFormat library's format_iterator component.

The article describes how FastFormat's flexiblity, expressiveness and type-safety has been combined with the output iterator concept  to produce the fastformat::format_iterator component. Applying STL-extension techniques described in Extended STL, volume 1, the format_iterator() component is able to create an output iterator that can receive arbitrate types, apply a format string or arbitrary complexity, and write to an arbitrary sink, as in:

 #include <fastformat/ff.hpp>
 #include <fastformat/iterators/format_iterator.hpp>
 #include <fastformat/sinks/ostream.hpp>

 int          numbers[] = { -2, -1, 0, 1, 2 };
 char const*  strings[] = { "abc", "def", "ghi" };
 std::string  prefix = "\t";
 char const*  suffix = "\n";


 std::copy(
   numbers, numbers + 5
 , ff::format_iterator(std::cout, "[{0}]"));

 // outputs "[-2][-1][0][1][2]"


 std::copy(
   strings, strings + 3
 , ff::format_iterator(std::cout, "{1}'{0}'{2}", prefix, suffix));

 // outputs:
 //     'abc'
 //     'def'
 //     'ghi'



This is the fourth article on the FastFormat library, following on from the introductory series of three published in ACCU's Overload magazine:

Monday, June 1, 2009

FastFormat introductory article series #3 published in Overload

The June issue of the ACCU's Overload magazine contains An Introduction to FastFormat, part 3: Solving Real Problems, Quickly. This is the third in a series of three articles about FastFormat that examine the current alternatives in C++ formatting, and demonstrate how FastFormat provides an optimal mix of robustness, efficiency, flexibility, expressiveness and other software quality measures.

Wednesday, April 1, 2009

FastFormat introductory article series #2 published in Overload

The April issue of the ACCU's Overload magazine contains An Introduction to FastFormat, part 2: Custom Argument and Sink Types. This is the second in a series of three articles about FastFormat that examine the current alternatives in C++ formatting, and demonstrate how FastFormat provides an optimal mix of robustness, efficiency, flexibility, expressiveness and other software quality measures.

Sunday, February 1, 2009

FastFormat introductory article series #1 published in Overload

The February issue of the ACCU's Overload magazine contains An Introduction to FastFormat, part 1: The State of the Art. This is the first in a series of three articles about FastFormat that examine the current alternatives in C++ formatting, and demonstrate how FastFormat provides an optimal mix of robustness, efficiency, flexibility, expressiveness and other software quality measures.