stencil/formatters.hpp
Go to the documentation of this file.
1 
8 /*****************************************************************************
9  ** Ifdefs
10  *****************************************************************************/
11 
12 #ifndef ECL_CONTAINERS_STENCIL_FORMATTERS_HPP_
13 #define ECL_CONTAINERS_STENCIL_FORMATTERS_HPP_
14 
15 /*****************************************************************************
16  ** Includes
17  *****************************************************************************/
18 
19 #include <cmath>
20 #include <ecl/config/macros.hpp>
24 #include <ecl/mpl/enable_if.hpp>
26 #include "../common/formatters.hpp"
27 
28 /*****************************************************************************
29  ** Namespaces
30  *****************************************************************************/
31 
32 namespace ecl
33 {
34 
35 /*****************************************************************************
36  ** Forward Declarations
37  *****************************************************************************/
38 
39 template<typename Container>
40  class Stencil;
41 
42 /*****************************************************************************
43  ** Namespaces
44  *****************************************************************************/
45 
46 namespace formatters
47 {
48 
49 /*****************************************************************************
50  ** Using
51  *****************************************************************************/
52 
71 template<typename ValueType, typename Container, typename Enable = void>
73 {
74 public:
76  {}
84  return stencil;
85  }
86  //ecl::Stencil< Container >& operator()(const ecl::Stencil< Container > &stencil) { return stencil;} // this was the old version - couldn't do in place format(xxx.stencil()) commands
87 };
88 
89 /*****************************************************************************
90  ** Specialisations
91  *****************************************************************************/
92 
102 template <typename ValueType, typename Container>
103 class ECL_PUBLIC StencilFormatter< ValueType, Container, typename ecl::enable_if< ecl::is_float<ValueType> >::type > : public FloatContainerFormatter< ecl::Stencil< Container > >
104 {
105 public:
114  StencilFormatter(const int p=2, const int w=-1) : FloatContainerFormatter< ecl::Stencil< Container > >(p,w) {};
116  {}
117 };
118 
119 } // namespace formatters
120 } // namespace ecl
121 
122 #endif /* ECL_CONTAINERS_STENCIL_FORMATTERS_HPP_ */
Embedded control libraries.
A safe windowing class that opens onto array-like containers.
Pseudo formatter for stencils.
const ecl::Stencil< Container > & operator()(const ecl::Stencil< Container > &stencil)
Parent interface for formatters of fixed size float/double containers.
#define ECL_PUBLIC


ecl_containers
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:18:43