#ifndef TREE_HPP
#define TREE_HPP

#include <vector>
#include <cstdlib>
#include <string>
#include "Body.hpp"

namespace nbody {
	using namespace std;

	class Node;

	class Tree {
		friend class Node;
	protected:
		Node* nodes;
	public:
		static vector<Body> dubinskiParse(string filename);

		Tree();
		virtual ~Tree();
		virtual void clean();
		virtual void build(vector<Body> bodies) = 0;
		virtual int numberOfChildren() = 0;
		virtual unsigned long numberOfNodes();
		virtual void accumulateForceOnto(Body& body);
		virtual void computeForces();
		virtual void moveBodies();
		virtual vector<Body> extractBodies();
		virtual void rebuildTree();
		virtual void print();
		virtual bool isCorrect();
	};


}

#endif
