Main Page
Modules
Namespaces
Classes
Files
File List
File Members
include
ecl
formatters
common.hpp
Go to the documentation of this file.
1
8
/*****************************************************************************
9
** Ifdefs
10
*****************************************************************************/
11
12
#ifndef ECL_FORMATTERS_COMMON_HPP_
13
#define ECL_FORMATTERS_COMMON_HPP_
14
15
/*****************************************************************************
16
** Namespaces
17
*****************************************************************************/
18
19
namespace
ecl
{
20
21
/*****************************************************************************
22
** Format Tags
23
*****************************************************************************/
29
enum
Alignment
30
{
31
NoAlign
,
32
LeftAlign
,
33
RightAlign
,
34
CentreAlign
,
35
};
36
37
/*****************************************************************************
38
** Default precision widths
39
*****************************************************************************/
40
/*
41
* These must match the default format precisions for each fundamental type.
42
*/
51
template
<
typename
Type>
struct
PrecisionWidth
{
52
public
:
53
static
const
int
value
= 0;
54
};
55
64
template
<>
65
struct
PrecisionWidth
<float> {
66
public
:
67
static
const
int
value
= 4;
68
};
69
78
template
<>
79
struct
PrecisionWidth
<double> {
80
public
:
81
static
const
int
value
= 4;
82
};
83
84
/*****************************************************************************
85
* Format Classes
86
*****************************************************************************/
98
template
<
typename
T>
99
class
Format
:
public
T::Formatter
{};
100
101
};
// namespace ecl
102
103
#endif
/*ECL_FORMATTERS_COMMON_HPP_*/
ecl
ecl::LeftAlign
LeftAlign
ecl::Format
Primary template for all formatter classes.
Definition:
common.hpp:99
ecl::PrecisionWidth::value
static const int value
Definition:
common.hpp:53
ecl::NoAlign
NoAlign
ecl::PrecisionWidth
Precision width trait for fundamental types.
Definition:
common.hpp:51
ecl::RightAlign
RightAlign
Formatter
MatrixFormatter< Derived, Scalar > Formatter
Definition:
plugin.hpp:28
ecl::Alignment
Alignment
ecl::CentreAlign
CentreAlign
xbot_node
Author(s): Roc, wangpeng@droid.ac.cn
autogenerated on Sat Oct 10 2020 03:28:13