// Site Mapper // // Douglas Thrift // // $Id$ #ifndef _Page_hpp_ #define _Page_hpp_ #include "SiteMapper.hpp" class Page { private: string address; string path; string title; vector children; public: Page(const string& address, const string& path, const string& title); Page(const string& url); ~Page() {} string getAddress(void) const { return address; } string getPath(void) const { return path; } string getTitle(void) const { return title; } vector getChildren(void) const { return children; } string getUrl(void) const { return "http://" + address + path; } void setAddress(const string& address) { this->address = address; } void setPath(const string& path) { this->path = path; } void setTitle(const string& title) { this->title = title; } void setChildren(vector& children) { this->children = children; } void setUrl(const string& url); bool operator==(const string& thing) const; bool operator==(const Page& page) const; bool operator!=(const string& thing) const; bool operator!=(const Page& page) const; bool operator<(const Page& page) const; bool operator>(const Page& page) const; // friends: friend bool operator==(const string& thing, const Page& page) { return page == thing; } friend bool operator!=(const string& thing, const Page& page) { return page == thing; } }; #endif // _Page_hpp_