
Matthieu Garrigues <garrigues@lrde.epita.fr> writes:
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog: 2007-10-26 Matthieu Garrigues <garrigues@lrde.epita.fr>
Fix tree. * mln/util/branch_iter.hh, * mln/util/tree.hh, * tests/tree.cc: Fix.
Be more explicit. [...]
Index: trunk/milena/mln/util/tree.hh =================================================================== --- trunk/milena/mln/util/tree.hh (revision 1394) +++ trunk/milena/mln/util/tree.hh (revision 1395) @@ -55,6 +55,7 @@ { public:
+ typedef std::vector< node<T>* > children_t;
It's always a good thing to document the interface of a class. Unless this typedef is solely used by the implementation (in which case, it shall be private), please document it. [...]
@@ -66,15 +67,15 @@ /// \}
/// Access to the children - const std::vector< node<T>* >& children() const; - std::vector< node<T>* >& children(); + const children_t& children() const; + children_t& children();
/// Access to the parent node. + //node<T>*& parent();
Dead code. [...]
@@ -142,12 +144,19 @@ }
template <typename T> + branch<T> + tree<T>::main_branch() + { + return branch<T>(*this, root()); + }
Undocumented function in ChangeLog entry. [...]
@@ -222,14 +231,20 @@ parent->child_.push_back(this); }
- template <typename T> - node<T>* - node<T>::get_parent() + const node<T>* + node<T>::parent() const { return parent_; }
+// template <typename T> +// node<T>*& +// node<T>::parent() +// { +// return parent_; +// }
Dead code. [...]