// YahooNode.h: interface for the YahooNode class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_YAHOONODE_H__0EEE6A44_8253_11D3_9345_0060674E1056__INCLUDED_)
#define AFX_YAHOONODE_H__0EEE6A44_8253_11D3_9345_0060674E1056__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<vector>
#include<string>
#include<fstream>
#include<iostream>
#include<map>

#include "URL.h"

using namespace std;

class YahooNode  
{
public:
	void printAsHTML(map<string, URL> & m);
	void addChild(YahooNode * n);
	//returns true is this node is a child of n.
	bool childOf(const YahooNode & n);

	//reads the next node from the istream (node in rdf format)
	friend istream & operator>>(istream & is, YahooNode & n);


	string title;
	vector<string> urls;
	YahooNode * firstChild;
	YahooNode * nextSibling;

	YahooNode() : title(""), firstChild(0), nextSibling(0) {};
	YahooNode (string t, YahooNode * fc = 0, YahooNode * ns = 0) :
	title(t), firstChild(fc), nextSibling(ns) {};
	virtual ~YahooNode() {
//		delete firstChild;
//		delete nextSibling;
	}

};

#endif // !defined(AFX_YAHOONODE_H__0EEE6A44_8253_11D3_9345_0060674E1056__INCLUDED_)