Program Listing for File common.hpp
↰ Return to documentation for file (include/ecl/formatters/common.hpp
)
/*****************************************************************************
** Ifdefs
*****************************************************************************/
#ifndef ECL_FORMATTERS_COMMON_HPP_
#define ECL_FORMATTERS_COMMON_HPP_
/*****************************************************************************
** Namespaces
*****************************************************************************/
namespace ecl {
/*****************************************************************************
** Format Tags
*****************************************************************************/
enum Alignment
{
NoAlign,
LeftAlign,
RightAlign,
CentreAlign,
};
/*****************************************************************************
** Default precision widths
*****************************************************************************/
/*
* These must match the default format precisions for each fundamental type.
*/
template <typename Type> struct PrecisionWidth {
public:
static const int value = 0;
};
template <>
struct PrecisionWidth<float> {
public:
static const int value = 4;
};
template <>
struct PrecisionWidth<double> {
public:
static const int value = 4;
};
/*****************************************************************************
* Format Classes
*****************************************************************************/
template <typename T>
class Format : public T::Formatter {};
} // namespace ecl
#endif /*ECL_FORMATTERS_COMMON_HPP_*/