fmtd.h File Reference

This file defines the symbol, cxxtls::fmtd, that can be used to invoke snprintf on single data items easily in a C++ program without declaring a local buffer to hold the results. More...

#include <iostream>
#include <portable_io.h>
#include <cxxtls/classTraits.h>
Include dependency graph for fmtd.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fmtd< WIDTH, PRECISION, PAD, BASE, ERRCHR >
 A numeric to ascii string conversion class based on snprintf. The constructor for this class constructs an object containing a char buffer holding the formatted resultant string. More...
struct  algo< bctClassType, char const *, fieldWidth, precision, lJust, padding, pad, base, errchr >
 A specialization for the algo template that is creates the integer formatting algorithm used by fmtd<> below. More...
struct  algo< bctFloatType, T, fieldWidth, precision, lJust, padding, pad, base, errchr >
 A specialization for the algo template that is creates the integer formatting algorithm used by fmtd<> below. More...
struct  algo< bctIntegralType, T, fieldWidth, precision, lJust, padding, pad, base, errchr >
 A class which defines a member type, type, which actually implements the formatting algorithm for fmtd<> below. More...
struct  FloatFormatter< T, fieldWidth, precision, lJust, padding, pad, base, errchr >
 This functor formats floats, doubles, and long doubles in the way that should be done for class fmtd<> More...
struct  IntFormatter< T, fieldWidth, precision, lJust, padding, pad, base, errchr >
 This functor formats ints, shorts, char, unsigned, long, long long, etc. in the way that should be done for class fmtd<> More...
struct  StringFormatter< T, fieldWidth, precision, lJust, padding, pad, base, errchr >
 This functor formats strings in the way that should be done for class fmtd<> More...

Namespaces

namespace  cxxtls
 

The namespace that encapsulates most of the functionality in the CXX toolkit.


namespace  cxxtls::fmtdalgo
 

fmtdalgo defines symbols used by the fmtd interface. It is only needed because you can't specialize a template in a class body -- DOH! STUPID C++


Functions

void int2ascii (char *&scan, int d)
 Converts the specified integer into an ascii string stored at the specified location.
void setup (char *&scan, int fieldWidth, int precision, bool lJust, bool padding, char pad)
 Setup most of the parameters to the control string used in invoking sprintf. Does not append a nul.

Detailed Description

This file defines the symbol, cxxtls::fmtd, that can be used to invoke snprintf on single data items easily in a C++ program without declaring a local buffer to hold the results.

Definition in file fmtd.h.

Generated on Wed Feb 29 22:51:05 2012 for CXXUtilities by  doxygen 1.6.3