26 #ifndef MLN_CORE_ALIAS_POINT3D_HH
27 # define MLN_CORE_ALIAS_POINT3D_HH
34 # include <mln/core/point.hh>
36 # include <mln/core/concept/site_proxy.hh>
37 # include <mln/core/internal/force_exact.hh>
55 template <
typename C,
typename E>
56 struct subject_impl< const point<grid::cube, C>, E >
62 typedef const C& row_t;
65 typedef const C& col_t;
68 typedef const C& sli_t;
71 const C& operator[](
unsigned i)
const;
72 const C& last_coord()
const;
74 const E& exact_()
const;
80 template <
typename C,
typename E>
81 struct subject_impl< point<grid::cube, C>, E > :
82 subject_impl< const point<grid::cube, C>, E >
85 typedef subject_impl< const point<grid::cube, C>, E > super_;
98 using super_::operator[];
99 C& operator[](
unsigned i);
104 # ifndef MLN_INCLUDE_ONLY
108 template <
typename C,
typename E>
111 subject_impl< const point<grid::cube, C>, E >::row()
const
113 return exact_().get_subject().row();
116 template <
typename C,
typename E>
119 subject_impl< const point<grid::cube, C>, E >::col()
const
121 return exact_().get_subject().col();
124 template <
typename C,
typename E>
127 subject_impl< const point<grid::cube, C>, E >::sli()
const
129 return exact_().get_subject().sli();
132 template <
typename C,
typename E>
135 subject_impl< const point<grid::cube, C>, E >::operator[](
unsigned i)
const
137 mln_precondition(i < 3);
138 return exact_().get_subject()[i];
141 template <
typename C,
typename E>
144 subject_impl< const point<grid::cube, C>, E >::last_coord()
const
149 template <
typename C,
typename E>
152 subject_impl< const point<grid::cube, C>, E >::exact_()
const
154 return internal::force_exact<const E>(*this);
159 template <
typename C,
typename E>
162 subject_impl< point<grid::cube, C>, E >::row()
164 return exact_().get_subject().row();
167 template <
typename C,
typename E>
170 subject_impl< point<grid::cube, C>, E >::col()
172 return exact_().get_subject().col();
175 template <
typename C,
typename E>
178 subject_impl< point<grid::cube, C>, E >::sli()
180 return exact_().get_subject().sli();
183 template <
typename C,
typename E>
186 subject_impl< point<grid::cube, C>, E >::operator[](
unsigned i)
188 mln_precondition(i < 3);
189 return exact_().get_subject()[i];
192 template <
typename C,
typename E>
195 subject_impl< point<grid::cube, C>, E >::exact_()
197 return internal::force_exact<E>(*this);
200 # endif // ! MLN_INCLUDE_ONLY
208 # include <mln/core/alias/dpoint3d.hh>
211 #endif // ! MLN_CORE_ALIAS_POINT3D_HH