printf_traits Struct Template Reference
[Utility Library]

#include <stlsoft/util/printf_traits.hpp>

List of all members.


Detailed Description

template<typename T>
struct stlsoft::printf_traits< T >

Traits for determining the size, in printf-ed form, of the minimum and maximum values of types.

printf_traits is a traits class for acquiring enum values representing the lengths, when expressed in string form, of the minimum and maximum values of the type, and the maximum of the two. The lengths are inclusive of the null terminator.

  assert(stlsoft::printf_traits<ss_sint16_t>::size_min == 6);
  assert(stlsoft::printf_traits<ss_sint16_t>::size_max == 7);
  assert(stlsoft::printf_traits<ss_sint16_t>::size == 7);

Parameters:
T The type

Public Types

enum  {
  size_min,
  size_max,
  size
}

Static Public Member Functions

static char const * format_a ()
 Returns the appropriate printf format for the type.
static wchar_t const * format_w ()
 Returns the appropriate wprintf format for the type.

Member Enumeration Documentation

anonymous enum

Enumerator:
size_min  The number of characters (& null) in the minimum value.
size_max  The number of characters (& null) in the maximum value.
size  The maximum of size_min and size_max.


Member Function Documentation

static char const* format_a (  )  [static]

Returns the appropriate printf format for the type.

static wchar_t const* format_w (  )  [static]

Returns the appropriate wprintf format for the type.


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

Generated on Thu Jun 10 08:59:03 2010 for STLSoft by  doxygen 1.5.6