diff options
author | hugues <hugues@0f7e0d06-a6f9-0310-a55f-d5f984f55e4c> | 2006-03-25 15:07:51 +0000 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-03-18 10:06:55 +0100 |
commit | 56cc59cf44ec64440ba4d1c0d005196195c758e6 (patch) | |
tree | 0e4bc431438a05c2e32b8703a8c79dcbf26a7cbf /tags/START/glagen/algo_distribue/tree/tree.hh | |
parent | d49be924baa2759aefa5b5311a35adf50db48e12 (diff) |
git-svn-id: file:///usr/local/opt/svn/repos/glagen@12 0f7e0d06-a6f9-0310-a55f-d5f984f55e4c
Diffstat (limited to 'tags/START/glagen/algo_distribue/tree/tree.hh')
-rw-r--r-- | tags/START/glagen/algo_distribue/tree/tree.hh | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/tags/START/glagen/algo_distribue/tree/tree.hh b/tags/START/glagen/algo_distribue/tree/tree.hh deleted file mode 100644 index 86ce136..0000000 --- a/tags/START/glagen/algo_distribue/tree/tree.hh +++ /dev/null @@ -1,51 +0,0 @@ - - -#ifndef TREE_HH_ -# define TREE_HH_ - -#include <list> -#include <assert.h> -#include "node.hh" -// Rajouter l'include correspondant a la template de TYPENODE -// + implemente le std::cout abstrait pour les tests - -template<class TYPENODE> class Tree -{ -public: - // Construit la racine de l'arbre avec l'info dans son contenu - Tree(const TYPENODE& value) : _root(new Node<TYPENODE>(value)) {} - - Tree(const Tree<TYPENODE>& value) : _root(value._root) {} - - // Ajoute un noeud fils (avec info) a l'arbre - void add_node(const TYPENODE& value) { _root->add_child(value); } - - // Renvoie la racine de l'arbre de type Node - Node<TYPENODE>& get_node_root() const { return (*_root); } - - // Ajoute un autre arbre a la racine de l'arbre courant - void add_tree(const Tree &value) - { - _root->add_tree_node(value.get_node_root()); - } - - // Renvoie la liste de Node de ses fils - std::list< Node<TYPENODE> >& get_childs() { return _root->get_childs(); } - - // Information du nombre de fils - const unsigned int get_nb_childs() const - { - return (_root->get_nb_childs()); - } - - // Renvoie le noeud fils suivant le numero a partir de 0 - Node<TYPENODE> get_child(const unsigned int& i) const - { - return (_root->get_child(i)); - } - -private: - Node<TYPENODE> *_root; -}; - -#endif // TREE_HH_ |