common.hpp
Go to the documentation of this file.
00001 
00008 /*****************************************************************************
00009 ** Ifdefs
00010 *****************************************************************************/
00011 
00012 #ifndef ECL_FORMATTERS_COMMON_HPP_
00013 #define ECL_FORMATTERS_COMMON_HPP_
00014 
00015 /*****************************************************************************
00016 ** Namespaces
00017 *****************************************************************************/
00018 
00019 namespace ecl {
00020 
00021 /*****************************************************************************
00022 ** Format Tags
00023 *****************************************************************************/
00029 enum Alignment
00030 {
00031     NoAlign,        
00032     LeftAlign,      
00033     RightAlign,     
00034     CentreAlign,    
00035 };
00036 
00037 /*****************************************************************************
00038 ** Default precision widths
00039 *****************************************************************************/
00040 /*
00041  * These must match the default format precisions for each fundamental type.
00042  */
00051 template <typename Type> struct PrecisionWidth {
00052     public:
00053         static const int value = 0;
00054 };
00055 
00064 template <>
00065 struct PrecisionWidth<float> {
00066     public:
00067         static const int value = 4;
00068 };
00069 
00078 template <>
00079 struct PrecisionWidth<double> {
00080     public:
00081         static const int value = 4;
00082 };
00083 
00084 /*****************************************************************************
00085 * Format Classes
00086 *****************************************************************************/
00098 template <typename T>
00099 class Format : public T::Formatter {};
00100 
00101 }; // namespace ecl
00102 
00103 #endif /*ECL_FORMATTERS_COMMON_HPP_*/


ecl_formatters
Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Thu Jan 2 2014 11:12:10