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

#if !defined(AFX_URLCONTAINER_H__E9240791_614A_11D3_933D_0060674E1056__INCLUDED_)
#define AFX_URLCONTAINER_H__E9240791_614A_11D3_933D_0060674E1056__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<vector>
#include<algorithm>
#include<functional>
#include "URL.h"
using namespace std;

//#include "URL.h"

class URLContainer  
{
	//You will be using a vector.
	vector<URL> urls;
public: 

	//Takes as input is which refers to an RDF file and reads all the
	// URLs in that file, adding them to the container. (see the main.cpp
	// from PS2 for help).
	URLContainer(istream & is);
	URLContainer();
	virtual ~URLContainer();

	//Returns the number of elements in this container.
	int size();

	//Prints the Nth element
	void printNth(ostream & os, const int n);
	
	//Prints the first n URLs (given the current ordering) to os, one in each line.
	void printFirstN(ostream & os, const int n);

	//Sort the URLs based on the actual URLs (alphabetically).
	//NOTE: you might need to make the data members of URL public in order
	// to implement both of the sort functions. You might also want to 
	// implement operator< for the URL class...its up to you.
	void sortByURL();

	//Sort the objects alphabetically by title.
	void sortByTitle();
};

#endif // !defined(AFX_URLCONTAINER_H__E9240791_614A_11D3_933D_0060674E1056__INCLUDED_)