* mln/topo/face.hh
(mln::topo::face<D>::inc_n)
(mln::topo::face<D>::dec_n)
(mln::topo::face<D>::inc_face_id)
(mln::topo::face<D>::dec_face_id)
* mln/topo/n_face.hh
(mln::topo::n_face<N, D>::inc_face_id)
(mln::topo::n_face<N, D>::dec_face_id):
New methods.
---
milena/ChangeLog | 14 ++++++++++++++
milena/mln/topo/face.hh | 42 ++++++++++++++++++++++++++++++++++++++++++
milena/mln/topo/n_face.hh | 20 ++++++++++++++++++++
3 files changed, 76 insertions(+), 0 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 03789ee..d647d7e 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,17 @@
+2008-10-06 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Add extra accessors for topo::face<D> and topo::n_face<N, D>.
+
+ * mln/topo/face.hh
+ (mln::topo::face<D>::inc_n)
+ (mln::topo::face<D>::dec_n)
+ (mln::topo::face<D>::inc_face_id)
+ (mln::topo::face<D>::dec_face_id)
+ * mln/topo/n_face.hh
+ (mln::topo::n_face<N, D>::inc_face_id)
+ (mln::topo::n_face<N, D>::dec_face_id):
+ New methods.
+
2008-10-05 Roland Levillain <roland(a)lrde.epita.fr>
Introduce a header for iterators on complexes.
diff --git a/milena/mln/topo/face.hh b/milena/mln/topo/face.hh
index ac02877..bd2c3cd 100644
--- a/milena/mln/topo/face.hh
+++ b/milena/mln/topo/face.hh
@@ -88,10 +88,20 @@ namespace mln
/// Set the complex the face belongs to.
void set_cplx(complex<D>& cplx);
+
/// Set the dimension of the face.
void set_n(unsigned n);
+ /// Increment the dimension of the face.
+ void inc_n();
+ /// Decrement the dimension of the face.
+ void dec_n();
+
/// Set the id of the face.
void set_face_id(unsigned face_id);
+ /// Increment the id of the face.
+ void inc_face_id();
+ /// Decrement the id of the face.
+ void dec_face_id();
/// Return the mln::topo::face_data pointed by this handle.
template <unsigned N>
@@ -248,12 +258,44 @@ namespace mln
template <unsigned D>
inline
void
+ face<D>::inc_n()
+ {
+ ++n_;
+ }
+
+ template <unsigned D>
+ inline
+ void
+ face<D>::dec_n()
+ {
+ --n_;
+ }
+
+ template <unsigned D>
+ inline
+ void
face<D>::set_face_id(unsigned face_id)
{
face_id_ = face_id;
}
template <unsigned D>
+ inline
+ void
+ face<D>::inc_face_id()
+ {
+ ++face_id_;
+ }
+
+ template <unsigned D>
+ inline
+ void
+ face<D>::dec_face_id()
+ {
+ --face_id_;
+ }
+
+ template <unsigned D>
template <unsigned N>
inline
face_data<N, D>&
diff --git a/milena/mln/topo/n_face.hh b/milena/mln/topo/n_face.hh
index 6cf3b37..f0a7277 100644
--- a/milena/mln/topo/n_face.hh
+++ b/milena/mln/topo/n_face.hh
@@ -86,6 +86,10 @@ namespace mln
unsigned n() const;
/// Set the id of the face.
void set_face_id(unsigned face_id);
+ /// Increment the id of the face.
+ void inc_face_id();
+ /// Decrement the id of the face.
+ void dec_face_id();
/// Return the mln::topo::face_data pointed by this handle.
face_data<N, D>& data() const;
@@ -223,6 +227,22 @@ namespace mln
template <unsigned N, unsigned D>
inline
+ void
+ n_face<N, D>::inc_face_id()
+ {
+ ++face_id_;
+ }
+
+ template <unsigned N, unsigned D>
+ inline
+ void
+ n_face<N, D>::dec_face_id()
+ {
+ --face_id_;
+ }
+
+ template <unsigned N, unsigned D>
+ inline
face_data<N, D>&
n_face<N, D>::data() const
{
--
1.5.6.5
Show replies by date